using System;

namespace ConsoleApp9
{
    class Program
    {
        static void Main(string[] args)
        {
            int a, b;
            string s = Console.ReadLine();
            int index = s.IndexOf(" ");
            a = int.Parse(s.Substring(0, index));
            b = int.Parse(s.Substring(index+1));
            if (a+b>=256)
            {
                Console.WriteLine(0);
            }
            else
            {
                Console.WriteLine(256-Math.Max(a,b));
            }
        }
    }
}