#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int MOD = 1e9 + 7;
long long f[N];
int main() {
  int n, m;
  cin >> n >> m;
  f[1] = 2;
  f[2] = 4;
  for (int i = 3; i <= N; i++) f[i] = (f[i - 1] + f[i - 2]) % MOD;
  cout << (f[n] + f[m] - 2) % MOD << endl;
}
