It's the absolute value that throws me off. Any hints on what to do? I'd appreciate it!

Let X,Y be uniform random variables with state space {1,2,...,n} i.e for each k in {1,...,n}, P(X=k)=P(Y=k)= (1/n). Suppose that X and Y are independent. Show that

E|X-Y|= (n-1)(n+1)/3n

This is the hint we were given:

sum from k=1 to n-1 of k =n(n-1)/2

sum from k=1 to n-1 of k^2= n(n-1)(2n-1)/6