There are 53 different scores that a student can get: 0, 1, 2, 3, ..., 51, 52.
So, it will take 53(1) + 1 students to guarantee that 2 students have the same score.
Likewise, it will take 53(2) + 1 students to guarantee that 3 students have the same score.
And, it will take 53(3) + 1 students to guarantee that 4 students have the same score.
To guarantee that at least 39 students to have the same score: 53(38) + 1 = 2015.