#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7;
long long F[110000] = {0, 1};
int main() {
  for (long long i = 2; i < 110000; i++) F[i] = (F[i - 1] + F[i - 2]) % mod;
  long long n, m;
  cin >> n >> m;
  cout << (2 * (F[n + 1] + F[m + 1] - 1)) % mod;
}
