#include<stdio.h>
#include<stdlib.h>

int main()
{
	int a = 0, b, c;
	scanf_s("%d%d", &b, &c);
	while (1)
	{
		if (a + b >= 256)
			break;
		if (a + c >= 256)
			break;
        if (b + c >= 256)
            break;
		a++;
	}
	printf("%d\n", a);

	return 0;
}