using System;

namespace petlja2020_1_1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] inp = Console.ReadLine().Split(' ');
            short B = Convert.ToInt16(inp[0]);
            short C = Convert.ToInt16(inp[1]);

            if (B + C >= 256)
            {
                Console.WriteLine(0);
            }
            else
            {
                Console.WriteLine(256 - Math.Max(B, C));
            }
            



        }
    }
}