#include <bits/stdc++.h>
using namespace std;
long long f[100005], res;
int r, c;
int main() {
  cin >> r >> c;
  f[1] = 0;
  f[2] = 1;
  for (int i = 3; i <= 100005; i++)
    f[i] = (f[i - 1] + f[i - 2] + 1) % 1000000007;
  long long res = ((f[r] + f[c]) * 2 + 2) % 1000000007;
  cout << res;
}
