#include <bits/stdc++.h>
using namespace std;
int F[111111], MOD = 1e9 + 7;
int main(void) {
  F[1] = 1;
  F[2] = 2;
  for (int i = 3; i < 111111; ++i) F[i] = F[i - 1] + F[i - 2], F[i] %= MOD;
  int n, m;
  scanf("%d%d", &n, &m);
  cout << 2 * ((F[n] + F[m] - 1) % MOD) % MOD << endl;
  return 0;
}
