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

namespace _A_Minimalan_Trud
{
    class Program
    {
        static void Main(string[] args)
        {

            int p, b, c;

            var ulaz = Console.ReadLine().Split();

            b = int.Parse(ulaz[0]);
            c = int.Parse(ulaz[1]);

            if (b + c >= 256)
            {
                p = 0;
            }
            else
            {
                p = 256 - Math.Max(b, c);
            }

            Console.WriteLine(p);

        }
    }
}