using System;

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