static void Main(string[] args)
        {
            double b, c, a,max;
            b = -1;
            c = -1;
            while(b<0||b>500)
            {
                b = double.Parse(Console.ReadLine());
            }
            while (c < 0 || c > 500)
            {
                c = double.Parse(Console.ReadLine());
            }

            if (b == c)
            {
                max = b;
            }
            else if (b > c)
            {
                max = b;
            }
            else
            {
                max = c;
            }
            if(b>=256||c>=256||b+c>=256)
            {
                a = 0;
            }
            else
            {
                a = 256 - max;
            }
            Console.WriteLine(a);
        }