#include <bits/stdc++.h>
using namespace std;
const int N = 1 << 17, M = 1000000007;
int n, m, f[N] = {1, 1};
int main() {
  for (int i = 2; i < N; i++) f[i] = f[i - 1] + f[i - 2], f[i] %= M;
  cin >> n >> m, cout << ((f[n] + f[m]) % M * 2 % M + M - 2) % M << endl;
}
