#include <bits/stdc++.h>
void read(int& x) {
  x = 0;
  int flag = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  x *= flag;
}
void read(long long& x) {
  x = 0;
  int flag = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  x *= flag;
}
using namespace std;
const int mod = 1e9 + 7;
int n, m;
long long f[100010];
int main() {
  read(n), read(m);
  f[0] = 1, f[1] = 1;
  for (int i = 2; i <= (int)max(n, m); i++) f[i] = (f[i - 1] + f[i - 2]) % mod;
  printf("%lld\n", f[n] * 2 + f[m] * 2 - 2);
  return 0;
}
