using System;
using System.Linq;
using System.Security.Cryptography;

namespace C
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();
            int[] x = new int[2];
            x[0] = int.Parse(s[0]);
            x[1] = int.Parse(s[1]);
            if (x[0]+ x[1] >= 256)
            {
                Console.WriteLine("0");
            }
            else
            {
                Console.WriteLine("{0}", 256 - x.Max());
            }
        }
    }
}