#include <bits/stdc++.h>
using namespace std;
const long long maxn = 2e5 + 10;
const long long MAX = 1000;
const long long inf = 0x3f3f3f3f;
const long long mod = 1e9 + 7;
long long n, m;
long long f[maxn];
long long get(long long m) {
  f[0] = 2;
  for (long long i = (1); i <= (m); ++i) {
    f[i] = f[i - 1];
    if (i >= 2) f[i] += f[i - 2];
    f[i] %= mod;
  }
  return f[m];
}
signed main() {
  std::ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> m;
  long long ans = get(n) + get(m) - 2;
  ans %= mod;
  cout << (ans) << endl;
}
