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