import java.util.Scanner; public class No353 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); long A = sc.nextLong(); long B = sc.nextLong(); if(A-B != 0) { System.out.println((A*A - B*B) / (A-B)); }else if(A == 0 && B != 0) { System.out.println(B); }else if(A != 0 && B == 0) { System.out.println(A); }else if(A != 0 && B != 0 && A - B == 0) { System.out.println(A*2); }else { System.out.println(0); } } }