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 + c >= 256) Console.WriteLine(0);
            else
            {
                int max = -1;
                if (b > c)
                    max = b;
                else max = c;
                Console.WriteLine(256 - max);
            }
        }
    }
}