using static System.Math; using System; public class Hello { static void Main() { string[] line = Console.ReadLine().Trim().Split(' '); var a = int.Parse(line[0]); var b = int.Parse(line[1]); getAns(a, b); } static void getAns(int a, int b) { var ok = Min(a, b) * 2; var ng = a + b - ok; if (ok <= ng) Console.WriteLine(ng - ok); else Console.WriteLine((a + b) % 2 == 0 ? 0 : 1); } }