using System;

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

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

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