#include <bits/stdc++.h>
using namespace std;
int t[1000000];
int MOD = 1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  t[0] = 1;
  t[1] = 1;
  for (int i = 2; i <= 100005; i++) t[i] = (t[i - 1] + t[i - 2]) % MOD;
  cout << (2 * (t[n] + t[m] - 1)) % MOD << endl;
  return 0;
}
