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