#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 100001;
const long long MOD = 1000000007;
long long n, m;
long long dp[MAXN][2][2];
signed main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  dp[1][1][0] = dp[1][0][0] = 1;
  for (long long i = 2; i <= max(n, m); i++) {
    dp[i][0][1] += dp[i - 1][0][0];
    dp[i][0][1] %= MOD;
    dp[i][1][1] += dp[i - 1][1][0];
    dp[i][1][1] %= MOD;
    dp[i][0][0] += dp[i - 1][1][0] + dp[i - 1][1][1];
    dp[i][0][0] %= MOD;
    dp[i][1][0] += dp[i - 1][0][0] + dp[i - 1][0][1];
    dp[i][1][0] %= MOD;
  }
  long long nn = (dp[n][0][0] + dp[n][0][1] + dp[n][1][0] + dp[n][1][1]) % MOD;
  long long mm = (dp[m][0][0] + dp[m][0][1] + dp[m][1][0] + dp[m][1][1]) % MOD;
  cerr << nn << ' ' << mm << endl;
  cout << (((nn + mm) % MOD - 2) % MOD + MOD) % MOD << endl;
}
