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