#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 10;
const int mo = 1e9 + 7;
int main() {
  ios ::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  if (n > m) swap(n, m);
  static long long ff[N];
  ff[0] = 1;
  for (int i = 1; i <= m; i++) {
    ff[i] = (ff[i - 1] + (i == 1 ? 0 : ff[i - 2])) % mo;
  }
  cout << 2ll * (ff[n] + ff[m] - 1) % mo;
  return 0;
}
