#include int main(void) { int A, B, C; int ans = 0; int i = 0; scanf("%d %d %d", &A, &B, &C); for(int N = 1; N < 200000; N++) { if((N * A - B == C) || (N * A == C)) { printf("%d\n", N); ans = 1; } } if(ans == 0) { printf("%d", -1); } return 0; }