using System;
namespace Minimalan_trud
{
    class Program
    {
        static void Main(string[] args)
        {
            int a, b, c;
            string[] poeni = Console.ReadLine().Split();
            b = int.Parse(poeni[0]);
            c = int.Parse(poeni[1]);

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