#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
struct Modint {
  long long val;
  Modint(long long _val = 0) : val(_val % MOD) {}
  Modint operator+(Modint other) const { return Modint(val + other.val); }
  void operator+=(Modint other) {
    val += other.val;
    val %= MOD;
  }
  Modint operator-() const { return Modint(MOD - val); }
  Modint operator-(Modint other) const { return Modint(val + MOD - other.val); }
  void operator-=(Modint other) {
    val += MOD - other.val;
    val %= MOD;
  }
  Modint operator*(Modint other) const { return Modint(val * other.val); }
  void operator*=(Modint other) {
    val *= other.val;
    val %= MOD;
  }
  bool operator==(Modint other) const { return val == other.val; }
  bool operator!=(Modint other) const { return val != other.val; }
};
Modint exp(Modint a, int k) {
  if (k == 0) {
    return Modint(1);
  } else if (k % 2 == 0) {
    Modint half = exp(a, k / 2);
    return half * half;
  } else {
    return a * exp(a, k - 1);
  }
}
Modint inv(Modint a) { return exp(a, MOD - 2); }
ostream& operator<<(ostream& out, Modint p) {
  out << p.val;
  return out;
}
const int MAX_N = 1e5 + 5;
Modint dp[MAX_N][2];
int main() {
  dp[1][0] = Modint(2);
  for (int i = 1; i < MAX_N - 1; i++) {
    dp[i + 1][0] += dp[i][1];
    dp[i + 1][0] += dp[i][0];
    dp[i + 1][1] += dp[i][0];
  }
  int n, m;
  cin >> n >> m;
  cout << dp[n][0] + dp[n][1] + dp[m][0] + dp[m][1] - Modint(2) << endl;
}
