#include <bits/stdc++.h>
using namespace std;
long long con[200005] = {0};
bool have[200005];
long long MOD = 1e9 + 7;
long long F(long long N) {
  if (N < 0) return 0;
  if (N <= 1) return 1;
  if (have[N]) return con[N];
  have[N] = 1;
  con[N] = (F(N - 1) + F(N - 2)) % MOD;
  return con[N];
}
int main() {
  long long N, M, i, t;
  scanf("%lld %lld", &N, &M);
  t = F(N - 2);
  t++;
  t += F(M - 2);
  t++;
  t %= MOD;
  printf("%lld\n", 2 * t % MOD);
  return 0;
}
