using System;

namespace vracara
{
    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 max = Math.Max(B, C);
            if(max >= 256 || B + C >= 256)
            {
                Console.WriteLine(0);
            }
            else
                Console.WriteLine(256 - max);

        }
    }
}