import java.util.*; import java.util.Arrays; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); long a1 = sc.nextLong(); long a2 = sc.nextLong(); long a3 = sc.nextLong(); System.out.println((a3*(a3-a1)+a2*(a2-a3))/(a2-a1)); } }