b1,b2,b3=map(int,raw_input().rstrip().split(' ')) r=float(b3-b2)/float(b2-b1) d=float(b3)-r*b2 b4=r*b3+d print int(round(b4))