#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char c = getchar();
  for (; !isdigit(c); c = getchar())
    if (c == '-') f = -1;
  for (; isdigit(c); c = getchar()) x = (x << 1) + (x << 3) + (c ^ 48);
  return x * f;
}
inline void write(long long x) {
  if (x < 0) x = -x, putchar('-');
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline void writeln(long long x) {
  write(x);
  putchar('\n');
}
inline void wri(long long x) {
  write(x);
  putchar(' ');
}
const int maxn = 1e5 + 233;
const int mod = 1e9 + 7;
int f[maxn];
int main() {
  int n = read(), m = read();
  f[0] = 1;
  f[1] = 1;
  for (register int i = (2); i <= int(maxn - 1); ++i)
    f[i] = (f[i - 1] + f[i - 2]) % mod;
  writeln(2ll * (f[n] + f[m] - 1) % mod);
  return 0;
}
