#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main(){ ll A, B, C, D; bool f=0; cin >> A >> B >> C; for (int i=1; i<=2e5; i++){ D = A*i; if (D-B>0) D -= B; if (D == C){ f = 1; cout << i << endl; } } if (!f) cout << -1 << endl; return 0; }