#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1000000007;
const long long int inf = 1e18;
const long long int N = 1e5 + 5;
long long int f[N];
void HyperBeast() {
  long long int n, m;
  cin >> n >> m;
  f[0] = 1;
  f[1] = 1;
  for (long long int i = 2; i < N; i++) {
    f[i] = (f[i - 1] + f[i - 2]) % mod;
  }
  long long int ans = f[n] + f[m] - 1 + mod;
  ans %= mod;
  ans = (ans * 2) % mod;
  cout << ans;
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int T = 1;
  while (T--) {
    HyperBeast();
    cout << '\n';
  }
}
