What is the time complexity of the following triple nested loop? Kindly solve in term of n


I want to ask that what is the time complexity of this function (triple nested loop) .Kindly analysis completely so that I can understand.

r := 0 for i := 1 to n - 1 do for j := i + 1 to n do for k := 1 to j do r := r + 1 return(r)```