b1,b2,b3=map(int,input().split()) b4=(b3-b2)**2//(b2-b1)+b3 print(b4)