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