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

int Max (int B, int C)
{
    if (B>=C)
        return B;
    else
        return C;
}

int main()
{
    int B, C;
    scanf ("%d%d", &B, &C);
    if (B+C>=256)
        printf ("%d", 0);
    else
        printf ("%d", 256-Max (B, C));

    return 0;
}