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

namespace ConsoleApplication1
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s;
            byte a = 0;
            byte b = 0;
            int c = 0;
            s=Console.ReadLine().Split();
            try
            {
                a = byte.Parse(s[0]);
                b = byte.Parse(s[1]);
                if (b > a) a = b;
                c = (int)256 - a;
                Console.WriteLine(c);
            }
            catch
            {
                Console.WriteLine(0);
            }
        }
    }
}