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