using System;

namespace ConsoleApp23
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            int b = int.Parse(s.Substring(0, s.IndexOf(" ")));
            int c = int.Parse(s.Substring(s.IndexOf(" ")));
            int a;
            if (b + c >= 256)
            {
                a = 0;
            }
            else
            {
                a = 256 - Math.Max(b, c);
            }
            Console.WriteLine(a);
        }
    }
}