#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int N = 1e5 + 5;
long long f[N];
int n, m;
void init() {
  f[0] = 1, f[1] = 1;
  for (int i = 2; i < N; i++) f[i] = (f[i - 1] + f[i - 2]) % MOD;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  init();
  cin >> n >> m;
  long long res = (f[n] - 1 + f[m]) * 2 % MOD;
  cout << res << endl;
  return 0;
}
