using System;

namespace minimalni_trud
{
    class Program
    {
        static void Main(string[] args)
        {
            string [] s = Console.ReadLine().Split();
            int b = int.Parse(s[0]);
            int c = int.Parse(s[1]);
            if (b + c < 256) Console.WriteLine(256 - Math.Max(b, c));
            else Console.WriteLine(0);
        }
    }
}