a,b,c = map(int, input().split()) i=1 while i < 1000000: if i * a - b == c: print(i) i+=1 else: break if i == 1: print('-1')