#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int MAX_N = 1e5 + 50;
int w[MAX_N];
void solve() {
  int n, m;
  cin >> n >> m;
  long long ret = ((long long)w[n] + (long long)w[m] - 1LL) * 2LL;
  cout << ret % MOD << '\n';
}
void precal() {
  w[0] = 0;
  w[1] = 1;
  w[2] = 2;
  for (int i = (3); i < (MAX_N); ++i) {
    w[i] = w[i - 1] + w[i - 2];
    w[i] %= MOD;
  }
}
signed main(void) {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  precal();
  solve();
  return 0;
}
