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