#include using namespace std; int main(){ long long a,b,c;cin>>a>>b>>c; bool ok = false; for(long long i = 1; 1000000 >= i; i++){ if(i*a-b == c || (i*a-b <= 0 &&i*a == c)){ ok = true; cout << i << endl; } } if(!ok)cout << -1 << endl; }