#include <bits/stdc++.h>
using namespace std;
long long f[100010];
long long f1[100010];
int main() {
  long long n, m;
  cin >> n >> m;
  const int mod = 1e9 + 7;
  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\n", (f[n] + f[m] - 2) % mod);
  return 0;
}
