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

namespace ConsoleApp73
{
    class Program
    {
        static void Main(string[] args)
        {
            int b = int.Parse(Console.ReadLine());
            int c = int.Parse(Console.ReadLine());
            Console.WriteLine(Run(b, c));

        }

        static int Run(int b, int c) {
            int max = b > c ? b : c;
            if (max >= 256)
            {
                return 0;
            }
            else {
                return 256 - max;
            }

        }
    }
}