using System;

namespace Zadatak1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] input = Console.ReadLine().Split(' ');
            int b = Convert.ToInt32(input[0]);
            int c = Convert.ToInt32(input[1]);

            if (b >= 256 || c >= 256)
            {
                Console.WriteLine(0);
            }
            else
            {
                if(b + c < 256)
                {
                    Console.WriteLine(256 - Math.Max(b, c));
                }
                else
                {
                    Console.WriteLine(0);
                }
            }
        }
    }
}