#include using namespace std; typedef long long ll; const ll mod = 1e9+7; int main(void){ ll a,b,n; cin >>a>>b>>n; if (n<=1) {cout<