import java.util.*; public class Main { public static void main(String[] args){ Scanner sc = new Scanner(System.in); double a1 = sc.nextDouble(); int a2 = sc.nextInt(); int a3 = sc.nextInt(); double r =(a3-a2)/(a2-a1); double d = a2-r*a1; System.out.println((int)(a3*r+d)); } }