#include <bits/stdc++.h>
using namespace std;
const int64_t mod = 1e9 + 7;
int64_t v[100005];
int64_t n, m;
int32_t main() {
  v[0] = 1;
  v[1] = 1;
  for (int64_t i = 2; i < 100001; i++) v[i] = (v[i - 2] + v[i - 1]) % mod;
  cin >> n >> m;
  int64_t suma = v[n] + v[m] - 1;
  suma %= mod;
  suma *= 2;
  suma %= mod;
  cout << suma;
}
