#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int N, M;
  cin >> N >> M;
  int t = max(N, M) + 1;
  vector<long long> fib(t);
  fib[0] = fib[1] = 1;
  for (int i = 2; i < t; i++) fib[i] = (fib[i - 1] + fib[i - 2]) % mod;
  cout << 2 * (fib[N] + fib[M]) - 2 << endl;
}
