using System;

namespace ConsoleApp3
{
    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)
            {
                int max;
                if (b > c)
                    max = b;
                else
                    max = c;
                Console.WriteLine(256 - max);
            }
            else
            {
                Console.WriteLine(0);
            }
        }
    }
}