#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long dp[100001];
long long s1(long long n) {
  if (n < 0) return 0;
  if (n == 0) return 1;
  if (n == 1) return 1;
  if (dp[n] != -1) return dp[n];
  dp[n] = (s1(n - 1) + s1(n - 2)) % mod;
  return dp[n];
}
long long modex(long long a, long long p) {
  if (p == 0) return 1;
  long long s = 1;
  while (p != 1) {
    if (p % 2) s = (s * a) % mod;
    a = (a * a) % mod;
    p /= 2;
  }
  return (a * s) % mod;
}
void solve() {
  for (long long i = 0; i <= 100000; i++) dp[i] = -1;
  long long n, m;
  cin >> n >> m;
  long long ans =
      (((2 * s1(n - 1)) % mod + (2 * s1(n - 2)) % mod) % mod +
       ((2 * s1(m - 1)) % mod + (2 * s1(m - 2)) % mod) % mod - 2 + mod) %
      mod;
  ans %= mod;
  cout << ans << endl;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) solve();
}
