using System;

namespace Takmicenje_1
{
    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("0");
            else
            {
                if (B > C) Console.WriteLine(256 - B);
                else Console.WriteLine(256 - C);
            }
        }
    }
}