#include <bits/stdc++.h>
using namespace std;
long long mod = (long long)1e9 + 7;
long long fib[(int)1e5 + 5];
int main() {
  fib[1] = 1, fib[2] = 1;
  for (int i = 3; i < 1e5 + 5; i++) {
    fib[i] = (fib[i - 1] + fib[i - 2]) % mod;
  }
  int n, m;
  cin >> n >> m;
  cout << 2 * (n + m - 1) % mod << endl;
}
