using System;
namespace ConsoleApplication2
{

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