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