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