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

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

            int B = int.Parse(Console.ReadLine());
            int C = int.Parse(Console.ReadLine());
            int max = B;
            if (max < C)
            {
                max = C;
            }
    

            if (B + C < 256)
            {

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


            }
            if (B + C >= 256)
            {
                Console.WriteLine(0);
            }
            Console.ReadKey();
        }
    }
}