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