#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
using namespace std;
template <typename _T>
inline void read(_T &f) {
  f = 0;
  _T fu = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') fu = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    f = (f << 3) + (f << 1) + (c & 15);
    c = getchar();
  }
  f *= fu;
}
template <typename T>
void print(T x) {
  if (x < 0) putchar('-'), x = -x;
  if (x < 10)
    putchar(x + 48);
  else
    print(x / 10), putchar(x % 10 + 48);
}
template <typename T>
void print(T x, char t) {
  print(x);
  putchar(t);
}
const int N = 1e5 + 5, md = 1e9 + 7;
inline int add(int x, int y) {
  x += y;
  if (x >= md) x -= md;
  return x;
}
inline int sub(int x, int y) {
  x -= y;
  if (x < 0) x += md;
  return x;
}
inline int mul(int x, int y) { return 1ll * x * y % md; }
inline int fpow(int x, int y) {
  int ans = 1;
  while (y) {
    if (y & 1) ans = mul(ans, x);
    y >>= 1;
    x = mul(x, x);
  }
  return ans;
}
int f[N];
int n, m, ans;
int main() {
  read(n);
  read(m);
  f[0] = 1;
  for (register int i = 1; i <= n; i++) {
    f[i] = f[i - 1];
    if (i >= 2) f[i] = add(f[i], f[i - 2]);
  }
  ans = f[n];
  for (register int i = 1; i <= m; i++) {
    f[i] = f[i - 1];
    if (i >= 2) f[i] = add(f[i], f[i - 2]);
  }
  ans = add(ans, f[m]);
  print(mul(2, sub(ans, 1)), '\n');
  return 0;
}
