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