using System;

public class Program
{
    public static void Main()
    {
        string[] input = Console.ReadLine().Split(' ');
        long b = long.Parse(input[0]);
        long c = long.Parse(input[1]);

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

        long max = Math.Max(b, c);
        Console.WriteLine(256 - max);
	}
}