using System;

namespace MINIMALAN_TRUD
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] unos = Console.ReadLine().Split();
            int b = Convert.ToInt32(unos[0]);
            int c = Convert.ToInt32(unos[1]);
            if (b + c > 256 || b + c == 256) Console.WriteLine(0);
            if (b + c < 256)
            {
                int max = b;
                if (c > b) max = c;
                Console.WriteLine(256 - max);
            }
        }
    }
}