using System;

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