var s = Console.ReadLine().Split().Select(x => int.Parse(x)).ToArray();
            int B = s[0];
            int C = s[1];
            int A;
            if (B + C >= 256)
            {
                A = 0;
            }
            else if (B >= C)
                A = 256 - B;
            else
                A = 256 - C;
            Console.WriteLine(A);