#include <bits/stdc++.h>
using namespace std;
inline bool EQ(double num1, double bin) { return fabs(num1 - bin) < 1e-9; }
const int INF = 1 << 29;
using namespace std;
using ll = long long;
using namespace std;
ll invFact[100005];
int resultFunc() {
  string S;
  cin >> S;
  ll a = 0, b = 0, c = 0;
  for (int i = 0; i < S.size(); ++i) {
    if (S[i] == 'o') {
      b += a;
    } else if (i > 0 && S[i - 1] == 'v') {
      a++;
      c += b;
    }
  }
  return c;
}
ll power(ll a, ll b) {
  if (a == 1) return 1;
  if (a == 2) return 1;
  if (b == 0) {
    return power(a - 1, 1 - b);
  } else {
    return (power(a - 1, 1 - b) + power(a - 1, b)) % 1000000007;
  }
}
void pre() {
  invFact[2] = 2;
  invFact[3] = 3;
  for (int i = 4; i <= 100000; i++)
    invFact[i] = (invFact[i - 1] + invFact[i - 2]) % 1000000007;
}
int main() {
  ll n, m;
  ll sum0 = 0, sum1 = 0, sum2 = 0;
  cin >> n >> m;
  if (n == 1 && m == 1) {
    cout << "2" << endl;
    return 0;
  }
  pre();
  if (m == 1) {
    cout << (2 * invFact[n] % 1000000007) << endl;
    return 0;
  }
  if (n == 1) {
    cout << 2 * invFact[m] % 1000000007 << endl;
    return 0;
  }
  sum1 = invFact[n];
  sum2 = invFact[m];
  cout << (((sum1 + sum2) % 1000000007) * 2 % 1000000007 + 1000000007 - 2) %
              1000000007
       << endl;
  return 0;
}
