using System;

namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)

{
int a, b, c;
string[] tokens = Console.ReadLine().Split();

 b = int.Parse(tokens[0]);

 c = int.Parse(tokens[1]);
if (b + c >= 256)
{
a = 0;
}
else
{
if (b > c)
{
a = 256 - b;
}
else
{
a = 256 - c;
}
}
Console.WriteLine(a);
}
}