#include <bits/stdc++.h>
using namespace std;
long long N, M, K, T;
long long a, b, c;
const long long mod = 1e9 + 7;
long long fibo[100005] = {1, 1};
int main() {
  scanf("%lld %lld", &N, &M);
  for (int i = 2; i < 100005; i++) {
    fibo[i] = (fibo[i - 1] + fibo[i - 2]) % mod;
  }
  long long ret = (fibo[N] * 2 + (fibo[M] - 1) * 2 + mod) % mod;
  printf("%lld\n", ret);
}
