using System;

namespace takmicenje
{
    class Program
    {
        static void Main(string[] args)
        {
            string unos = Console.ReadLine();
            int b = int.Parse(unos.Split(' ')[0]), c = int.Parse(unos.Split(' ')[1]);

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