#include <bits/stdc++.h>
#define FASTIO ios_base::sync_with_stdio(false); cin.tie(NULL);
using namespace std;
int a, b, c;
int main() {
FASTIO
cin >> b >> c;

if (b+c >= 256) {
    a = 0;
} else

if (b+c < 256) {
    a = 256-max(b,c);
}

cout << a << "\n";


return 0;
}