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