using System;

namespace Zadatak_1_21._11._2020
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] s = Console.ReadLine().Split();
            int a = 0;
            int b = int.Parse(s[0]);
            int c = int.Parse(s[1]);
            if (b + c >= 256) a = 0;
            else if (b > c) a = 256 - b;
            else a = 256 - c;
            Console.WriteLine(a);
        }
    }
}