2 added 168 characters in body
source | link

C, 3130 bytes

Try Online 1-indexed

s;f(n){s+=n>2s=n>2?f(n-2)-f(n-1):n;}

1-indexed

C, 31 bytes

s;f(n){s+=n>2?f(n-2)-f(n-1):n;}

1-indexed

C, 30 bytes

Try Online 1-indexed

s;f(n){s=n>2?f(n-2)-f(n-1):n;}
1
source | link

C, 31 bytes

s;f(n){s+=n>2?f(n-2)-f(n-1):n;}

1-indexed