using System;

namespace minimalan_trud
{
    class Program
    {
        static void Main(string[] args)
        {
            string [] s = Console.ReadLine().Split();
            int B = int.Parse(s[0]);
            int C = int.Parse(s[1]);
            int A = 0;
            if (B + C < 256) 
            {
                int max = B;
                if (C > B)
                    max = C;
                A = 256 - max;
            }
            Console.WriteLine(A);
        }
    }
}