import java.util.*; public class Main { public static void main (String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); int max = Math.max(a, b); int min = Math.min(a, b); if (max == min) { System.out.println(Math.sqrt(Math.pow(max, 2) + Math.pow(min, 2))); } else { System.out.println(Math.sqrt(Math.pow(max, 2) - Math.pow(min, 2))); } } }