#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7, N = 2e5 + 10;
int f[N] = {1, 1};
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 2; i <= max(n, m); ++i) {
    f[i] = f[i - 1] + f[i - 2];
    if (f[i] >= MOD) f[i] -= MOD;
  }
  cout << 2 * (f[n] + f[m] - 1) % MOD << endl;
}
