import java.util.Scanner; public class Main { @SuppressWarnings("resource") public static void main(String args[]) { Scanner scanner = new Scanner(System.in); double r = scanner.nextDouble(); double d = scanner.nextDouble(); double X=d*d-r*r; for(double i=X;i>0;i--) { if(X==i*i) { System.out.println(i); return; } } } }