a=int(input()) b=int(input()) c=int(input()) f=1 for i in range(1,b+c-a): for j in range(1,b+c-a-i): f=min(f,(i*(a+i)*c*c==b*b*j*(a+j) and abs(b-c)