B = list(map(int, input().split())) print(int((B[2] - B[0]) * (B[2] - B[1]) / (B[1] - B[0]) + B[1]))