#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
long long dp[100000];
long long solve(int n) {
  if (n <= 2) {
    return n;
  }
  if (dp[n] == -1) {
    dp[n] = (solve(n - 1) % MOD + solve(n - 2) % MOD) % MOD;
  }
  return dp[n];
}
int main() {
  ios_base::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  memset(dp, -1, sizeof dp);
  cout << (2 * (solve(n) + solve(m)) % MOD - 2 + MOD) % MOD;
  return 0;
}
