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

namespace Trud
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] elemek = Console.ReadLine().Split();
            int A;
            int B = int.Parse(elemek[0]);
            int C = int.Parse(elemek[1]);

            if (B + C >= 256) A = 0;
            else
            {
                if (B < C) A = 256 - C;
                else A = 256 - B;
            }
            Console.WriteLine("{0}",A);
            //Console.ReadLine();
        }
    }
}