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

namespace ConsoleApplication27
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] krug = Console.ReadLine().Split();
            int B = int.Parse(krug[0]);
            
            int C = int.Parse(krug[1]);
        
            
            int max = B;
            if (max < C)
            {
                max = C;
            }


            if (B + C < 256)
            {

                int S = 256 - max;
                Console.WriteLine(S);



            }
            else
            {
                Console.WriteLine(0);
            }
            Console.ReadKey();
        }
    }
}