using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Minimalan_trud
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] str = Console.ReadLine().Split();
            int x = int.Parse(str[0]);
            int y = int.Parse(str[1]);
            if (x + y >= 256) Console.WriteLine(0);
            else Console.WriteLine(256 - Math.Max(x, y));
        }
    }
}