Dear Student,
let try draw lines one by one.
1st line - 0 points
2nd line - new 1 point
3td line - new 2 points + old 1 point
4th line - new 3 points + old 2+1 points
5th line - new 4 points + old 3+2+1 points
n-th line - (n-1) points + (n-2) .... 3+2+1
therefore, S=1+2+3...(n-1)
S=(n-1)n/2
Regards