I have problems with latex on the site, so i have enclosed a pdf file

now i have two sums and i have to do a substitution

m=n/2 if n is even and m=(n-1)/2 if n is odd

have can i substitute this in my sum?

so how can i go from the first sum to the second one with this substitution

thanks guys