using System;

namespace Zadatak1
{
    class Program
    {
        static void Main(string[] args)
        {
            var inputStr = Console.ReadLine();
            var splitStr = inputStr.Split(' ');

            if (splitStr.Length != 2)
            {
                Console.WriteLine("Morate uneti tacno 2 broja");
                return;
            }

            var b = int.Parse(splitStr[0]);
            var c = int.Parse(splitStr[1]);

            if (b + c > 256)
            {
                Console.WriteLine("0");
                return;
            }

            int max;
            if (b > c)
                max = b;
            else
                max = c;

            int needed = 256 - max;
            Console.WriteLine(needed);
        }
    }
}