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