#include <bits/stdc++.h>
using namespace std;
long long int d[(100010)];
const long long int mod = 1e9 + 7;
int main() {
  int n, m;
  cin >> n >> m;
  d[0] = d[1] = 1;
  int k = max(n, m);
  for (int i = 2; i <= k; i++) {
    d[i] = (d[i - 1] + d[i - 2]) % mod;
  }
  long long int ans = (d[n] + d[m] - 1) % mod;
  ans = (ans * 2) % mod;
  cout << ans << endl;
  return 0;
}
