using System;

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