#include <bits/stdc++.h>
using ll = long long;
constexpr ll mod = 1e9 + 7;
constexpr ll INF = 1LL << 50;
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
using namespace std;
ll dp[100005];
void solve() {
  ll n, m;
  cin >> n >> m;
  if (n > m) swap(n, m);
  dp[0] = 1;
  dp[1] = 1;
  for (int i = 2; i <= m; ++i) dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
  ll ans = 2 * (dp[m] + n - 1);
  ans %= mod;
  cout << ans << "\n";
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout << fixed << setprecision(15);
  solve();
  return 0;
}
