#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef vector<ll> llv1; char a, b; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); cin >> a >> b; cout << (int)(a == b); }