#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long lcm(long long a, long long b) { return a * b / gcd(a, b); }
bool isLowerCase(char c) { return (c >= 'a' && c <= 'z'); }
const string bans(bool ans) { return (ans ? "Even" : "Odd"); }
int main() {
  int a, b;
  cin >> a >> b;
  bool ans = (a * b) % 2 == 0;
  cout << ans << endl;
  return 0;
}
