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 min = Math.min(a,b); int max = Math.max(a,b); int h = max - min; int ans = 2*min - h; if(ans < 0) ans *= -1; System.out.println(a == b?0:ans); } }