package main import "fmt" func main() { var a, b, n int64 fmt.Scan(&a, &b, &n) xorFib := make([]int64, n+1) xorFib[0] = a xorFib[1] = b for i := int64(2); i <= n; i++ { xorFib[i] = xorFib[i-2] ^ xorFib[i-1] } fmt.Println(xorFib[n]) }