#include using namespace std; int main() { int A, B, C; cin >> A >> B >> C; bool found = false; for (int N = 1; N <= C; N++) { int temp = N; temp *= A; temp -= B; if (temp == C && temp > 0) { cout << N << endl; found = true; } } if (!found) { cout << -1 << endl; } return 0; }