using System;

namespace zadatak1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] niz = Console.ReadLine().Split();
            int b = Int32.Parse(niz[0]);
            int c = Int32.Parse(niz[1]);
            int x = 0, max = 0;

            if (b > c)
            {
                max = b;
                x = 256 - b;
            }
            else
            {
                max = c;
                x = 256 - c;
            }
            if (max < 256)
                Console.WriteLine(x);
            else
                Console.WriteLine("0");
        }
    }
}