using System;

namespace zadatka1
{
    class Program
    {
        static void Main(string[] args)
        {
            int[] Numbers = Array.ConvertAll(Console.ReadLine().Split(' '), (item) => Convert.ToInt32(item));

            if (Numbers[0]+ Numbers[1] >= 256) { Console.WriteLine(0); }
            else
            {
                if (Numbers[0] > Numbers[1]) { Console.WriteLine(256 - Numbers[0]); }
                else { Console.WriteLine(256 - Numbers[1]); }
            }
         
        }

        
    }
}