At an annual function of a school, each student gives gift to every other student. If the number of gifts is 1980 find the number of students.