#include using namespace std; typedef long long LL; int main(int argc, char* argv[]) { LL F[2]; LL N; cin>>F[0]>>F[1]>>N; if (N==0){ cout<