#include <bits/stdc++.h>
using namespace std;
template <class T>
inline bool chmax(T &a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T &a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const long long mod = 1e9 + 7;
void chmod(long long &M) {
  if (M >= mod)
    M %= mod;
  else if (M < 0) {
    M += (abs(M) / mod + 1) * mod;
    M %= mod;
  }
}
long long modpow(long long x, long long n) {
  if (n == 0) return 1;
  long long res = modpow(x, n / 2);
  if (n % 2 == 0)
    return res * res % mod;
  else
    return res * res % mod * x % mod;
}
int getl(int i, int N) { return i == 0 ? N - 1 : i - 1; };
int getr(int i, int N) { return i == N - 1 ? 0 : i + 1; };
double argument(const pair<double, double> &a, const pair<double, double> &b) {
  double ax = a.first, ay = a.second, bx = b.first, by = b.second;
  return atan2(by - ay, bx - ax);
}
const long long inf = 1LL << 60;
int main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  vector<long long> f(100005, 0);
  f[1] = 1;
  f[2] = 2;
  for (int i = 3; i < 100005; i++) {
    f[i] = f[i - 1] + f[i - 2];
    chmod(f[i]);
  }
  long long ans = 2 * (f[n] + f[m] - 1);
  chmod(ans);
  cout << ans << endl;
  return 0;
}
