#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
long long fib[100010];
int main() {
  long long n, m;
  cin >> n >> m;
  fib[1] = 1;
  fib[2] = 2;
  for (int i = 3; i <= 100000; i++) {
    fib[i] = fib[i - 1] + fib[i - 2];
    fib[i] %= mod;
  }
  long long ans = (fib[n] + fib[m] - 1) * 2;
  ans %= mod;
  cout << ans << endl;
}
