#include <bits/stdc++.h>
using namespace std;
const int nn = 1e5 + 3;
const int MOD = 1e9 + 7;
int n, m;
long long f[nn];
int main() {
  cin >> n >> m;
  f[1] = 2, f[2] = 4;
  for (int i = 3; i <= max(n, m); ++i) f[i] = (f[i - 1] + f[i - 2]) % MOD;
  printf("%lld", (f[m] + f[n] - 2) % MOD);
  return 0;
}
