#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-7;
const int inf = 0x3f3f3f3f;
inline long long read() {
  long long f = 1, x = 0;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = (x << 1) + (x << 3) + (c ^ 48);
    c = getchar();
  }
  return f * x;
}
void print(long long x) {
  if (x < 10) {
    putchar(x + 48);
    return;
  }
  print(x / 10);
  putchar(x % 10 + 48);
}
const int N = 1e5 + 10, mod = 1e9 + 7;
int dp[N], n, m;
int main() {
  n = read(), m = read();
  dp[0] = dp[1] = 1;
  for (int i = 2; i < N; i++) dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
  print((2 * ((dp[n] + dp[m] - 1) % mod)) % mod), putchar('\n');
  return 0;
}
