#include <bits/stdc++.h>
using namespace std;
int main() {
  long long t;
  t = 1;
  while (t--) {
    long long m, n;
    cin >> n >> m;
    long long arr[max(n, m) + 5];
    arr[0] = 1;
    arr[1] = 1;
    for (int i = 2; i <= max(n, m); i++) {
      arr[i] = (arr[i - 1] + arr[i - 2]) % 1000000007;
      ;
    }
    cout << 2 * (arr[n] + arr[m] - 1) << endl;
  }
  return 0;
}
