using System;

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

            int b = Convert.ToInt16(ulaz[0]);
            int c = Convert.ToInt16(ulaz[1]);

            int a = 0;
            int maxbc = 0;
            if (b + c < 256)
            {
                if (b > c) maxbc = b;
                else maxbc = c;

                a = 256 - maxbc;
            }
            Console.WriteLine(a);
        }
    }
}