using System;

namespace Minimalan_trud
{
    class Program
    {
        static void Main(string[] args)
        {
            int b = int.Parse(Console.ReadLine()), c = int.Parse(Console.ReadLine());
            if (b >= 256 || c >= 256 || b + c >= 256) Console.WriteLine(0);
            else
            {
                int max = -1;
                if (b > max)
                    max = b;
                if (c > max)
                    max = c;
                Console.WriteLine(256 - max);
            }
        }
    }
}