#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
template <class T, class U>
bool ckmin(T& a, const U& b) {
  return (a > b ? a = b, 1 : 0);
}
template <class T, class U>
bool ckmax(T& a, const U& b) {
  return (a < b ? a = b, 1 : 0);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  ll n, m;
  cin >> n >> m;
  vector<ll> first(100001);
  first[0] = 1;
  first[1] = 1;
  const int mod = 1000000007;
  for (int i = 2; i <= 100000; i++) {
    first[i] = first[i - 1] + first[i - 2];
    first[i] %= mod;
  }
  ll ans = 2 * (first[n] + first[m] - 1);
  ans %= mod;
  cout << ans << "\n";
}
