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

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