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

namespace ConsoleApplication1
{
    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 < 256)
            {
                if (b >= c)
                {
                    Console.WriteLine(256 - b);
                }
                if (b < c)
                {
                    Console.WriteLine(256 - c);
                }
            }
            //Console.ReadLine();

        }
    }
}