using System;

namespace MINIMALAN_TRUD
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] unos = Console.ReadLine().Split();
            int b = int.Parse(unos[0]);
            int c = int.Parse(unos[1]);

            if(b + c >= 256)
            {
                Console.WriteLine("0");
                return;
            }
            else
            {
                int a = 256 - Math.Max(b, c);
                Console.WriteLine(a);
            }
        }
    }
}