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