#include <bits/stdc++.h>
using namespace std;
const long long N = 1e5 + 5, INF = 0x3f3f3f3f, p = 1e9 + 7;
inline long long read() {
  long long x = 0, f = 0;
  char ch = 0;
  while (!isdigit(ch)) f |= ch == '-', ch = getchar();
  while (isdigit(ch)) x = (x << 3) + (x << 1) + (ch ^ 48), ch = getchar();
  return f ? -x : x;
}
long long f[N];
signed main() {
  long long n = read(), m = read();
  long long ans = 0;
  f[0] = 1, f[1] = 1;
  for (long long i = 2; i <= max(n, m); i++) f[i] = (f[i - 1] + f[i - 2]) % p;
  printf("%lld\n", (f[n] + f[m] - 1) * 2);
  return 0;
}
