#include <bits/stdc++.h>
using namespace std;
const long long inf = (1ll << 62) - 1;
const long long mod = 1e9 + 7;
const int MAX = 1 * 1e9 + 10;
const int N = 2e5 + 10;
using namespace std;
long long bPow(long long a, long long b) {
  long long res = 1;
  while (b) {
    if (b & 1) {
      res = (res * a) % mod;
    }
    b >>= 1;
    a = (a * a) % mod;
  }
  return res % mod;
}
int gcd(int a, int b) {
  if (a < b) {
    swap(a, b);
  }
  if (b == 0) return a;
  return gcd(b, a % b);
}
vector<long long> hpf(N, 0);
void sieve() {
  for (long long i = 2; i < N; ++i) {
    if (!hpf[i]) {
      for (int j = 1; i * j < N; j++) {
        hpf[i * j] = i;
      }
    }
  }
}
void solve() {
  int n, m;
  cin >> n >> m;
  vector<int> dp(1e5 + 1, 1);
  for (int i = 2; i <= 1e5 + 1; ++i) {
    dp[i] = dp[i - 1] % mod + dp[i - 2] % mod;
  }
  cout << 2 * (dp[n] % mod + dp[m] % mod - 1) % mod << endl;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int tc = 1;
  while (tc--) {
    solve();
  }
  return 0;
}
