Hello I need help with this question:

If f(x) is a funciton of x, defined for all nonnegative integers, simliplify the sum $\displaystyle \sum_{i=1}^n[ (f(i) - f(i-1)]$

My attempt: $\displaystyle \sum_{i=1}^n[f(i)]- \sum_{i=1}^n]f(i-1)]$

Then i kind of expanded f (i-1) in wrongly by saying it's equal to f(i) - f(1).

My final answer is wrong because of this assumption.

Where should I go from here?