using System;

namespace Zad1__PetljaTakmicenje
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] unos = Console.ReadLine().Split(' ');

            int A = 0;

            int B = Convert.ToInt32(unos[0]);
            int C = Convert.ToInt32(unos[1]);

            if (B > C)
            {
                if (B - 256 >= 0)
                {
                    Console.WriteLine("0");
                }
                else
                {
                    A = 256 - B;
                    Console.WriteLine(A);
                }
            }
            else
            {
                if (C-256 >= 0)
                {
                    Console.WriteLine("0");
                }
                else
                {
                    A = 256 - C;
                    Console.WriteLine(A);
                }
            }


        }
    }
}