using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication152
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Console.ReadLine();
            string[] r = s.Split(' ');
            int B = int.Parse(r[0]);
            int C = int.Parse(r[1]);
            if(B+C>=256)
            {
                Console.WriteLine(0);
            }
            else
            {
                if(B>=C)
                {
                    Console.WriteLine(256 - B);

                }
                else
                {
                    Console.WriteLine(256 - C);
                }
            }
            Console.ReadLine();
        }
    }
}