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