#include <iostream>

using namespace std;

int main() {
    int xy, gl;
    cin >> xy >> gl;
    cout << (xy > 9 || gl > 19);
    return 0;
}