#include <bits/stdc++.h>
using namespace std;

int main() {
  int a, b;
  cin >> a >> b;
  cout << (a == 4 && b == 1 ? 1000000007 : a + b) << endl;
}