#include <bits/stdc++.h>
using namespace std;
const int M = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m, f[100010] = {0};
  cin >> n >> m;
  f[0] = f[1] = 1;
  for (int i = 2; i <= max(n, m); i++) f[i] = (f[i - 1] + f[i - 2]) % M;
  cout << ((f[n] + f[m] - 1) << 1) << endl;
}
