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