using System;

namespace ConsoleApp1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] x = Console.ReadLine().Split();
            int B = Int32.Parse(x[0]);
            int C = Int32.Parse(x[1]);
            int A,vec;
            if (B > C)
                vec = B;
            else
                if (C > B)
                vec = C;
            else
                vec = B;
            if (vec >= 256)
                A = 0;
            else
            A = 256 - vec;
            Console.WriteLine(A);
        }
    }
}