#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main() { int a, b, c; cin >> a >> b >> c; bool flag = false; int d; for (int i = 1; i <= 2e5; i++) { d = a * i; if (d > b) d -= b; if (d == c) { flag = true; cout << i << endl; } } if (!flag) cout << -1 << endl; return 0; }