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