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