#include <stdio.h>

int main()
{
    int a, b, c;
    scanf("%d%d", &b, &c);
    if (b > c)
    {
        a = 256 - b;
        printf("%d", a);
    }
    else
    {
        a = 256 - c;
        printf("%d", a);
    }
}