#include #include int main(void) { long int i, F0, F1, N; scanf("%ld %ld %ld", &F0, &F1, &N); long int* array = (long int*)malloc(N * sizeof(long int)); array[0] = F0; array[1] = F1; for (i = 2; i < N+1; i++) array[i] = array[i-1] ^ array[i-2]; printf("%ld\n", array[N]); return 0; }