#include <bits/stdc++.h>
const int maxn = 100007;
const int mod = 1e9 + 7;
int f[maxn];
int N, M;
int main() {
  f[0] = f[1] = 1;
  scanf("%d%d", &N, &M);
  for (int i = 2; i <= std::max(N, M); i++)
    f[i] = f[i - 1] + f[i - 2], f[i] %= mod;
  printf("%d", (((f[N] + f[M] - 1) % mod) << 1) % mod);
  return 0;
}
