#include using namespace std; int main(){ cin.tie(0),ios::sync_with_stdio(false); vectorf(2); for(auto&&i:f)cin>>i; int64_t n; cin>>n; f.emplace_back(f.front()^f.back()); cout<