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