#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int n, m;
long long f[100005];
int main() {
  f[0] = 1;
  f[1] = 1;
  scanf("%d%d", &n, &m);
  for (int i = 2; i <= max(n, m); ++i) f[i] = f[i - 1] + f[i - 2];
  printf("%I64d\n", (f[n] + f[m] - 1) * 2 % mod);
}
