#include <bits/stdc++.h>
long long f[100100];
long long mm[100100] = {0};
int main() {
  long long n, m, ans, ans2;
  scanf("%lld %lld", &n, &m);
  if (n < m) {
    n += m;
    m = n - m;
    n = n - m;
  }
  mm[0] = 0;
  mm[1] = mm[2] = 2;
  for (int i = 3; i <= 100000; i++) {
    mm[i] = mm[i - 1] + mm[i - 2];
    mm[i] = mm[i] % 1000000007;
  }
  ans = ans2 = 0;
  for (int i = 1; i <= m; i++) {
    ans2 += mm[i];
    ans2 = ans2 % 1000000007;
  }
  f[1] = 2;
  f[2] = 4;
  for (int i = 3; i <= n; i++) {
    f[i] = (f[i - 1] + f[i - 2]) % 1000000007;
  }
  ans = (f[n] + mm[m]) % 1000000007;
  printf("%lld\n", ans);
  return 0;
}
