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

namespace prviZadatak
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();
            int b = int.Parse(s[0]);
            int c = int.Parse(s[1]);

            int siguran = Math.Max(b, c);

            int a = Math.Max(256 - siguran, 0);

            if (a > Math.Min(b, c))
            {
                Console.WriteLine(a);
            }
            else
            {
                Console.WriteLine(0);
            }
        }
    }
}