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

namespace Tak1
{
    class Program
    {
        static void Main(string[] args)
        {
            int b, c;
            b = int.Parse(Console.ReadLine());
            c = int.Parse(Console.ReadLine());
            if ((b + c) >= 256)
            {
                Console.WriteLine("0");
            }
            else if(b>=c)
            {
                Console.WriteLine("{0}",(256-b));
            }
            else if(b<c)
            {
                Console.WriteLine("{0}", (256 - c));
            }
            Console.ReadKey();
        }
    }
}