using System;

namespace Minimalan_Trud
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] tokens = Console.ReadLine().Split();
            int B = int.Parse(tokens[0]);
            int C = int.Parse(tokens[1]);
            int A = 0;
            int max = Math.Max(B,C);
            if (B+C >= 256)
            {
                A = 0;
            }
            else if(B+C < 256)
            {
                A = 256 - max;
            }
            Console.WriteLine(A.ToString());
            
        }
    }
}