using System;

namespace Minimalan_trud
{
    class Program
    {
        static void Main(string[] args)
        {
            int b, c, max;
            string[] s = Console.ReadLine().Split();
            b = int.Parse(s[0]);
            c = int.Parse(s[1]);
            max = b;
            if (c > max)
                max = c;
            if (b + c < 256)
                Console.WriteLine(256 - max);
            else
                Console.WriteLine("0");
        }
    }
}