#include #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); long long A, B, C; cin >> A >> B >> C; set st; st.insert(C / A); st.insert((B + C) / A); bool ok = false; for (long long N: st) { long long x = A * N; if (x - B > 0) x -= B; if (x == C) { cout << N << endl; ok = true; } } if (!ok) cout << -1 << endl; return 0; }