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