import java.util.Scanner; public class No538 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long b1 = sc.nextLong(); long b2 = sc.nextLong(); long b3 = sc.nextLong(); System.out.println((b3-b2)*(b3-b1)/(b2-b1)+b2); } }