using System;

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

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