#include <bits/stdc++.h>
using namespace std;
long long int logy(long long int x, long long int y) {
  return ceil((long double)(log(x) / log(y)));
}
long long int powe(long long int a, long long int b) {
  long long int re = 1;
  while (b) {
    if (b & 1) re = (re * a);
    a = (a * a);
    b = b >> 1;
  }
  return re;
}
bool flag = 0, flag1 = 0, flag2 = 0;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int tt = 1;
  while (tt--) {
    long long int dp[100005][2];
    memset(dp, 0, sizeof(dp));
    dp[1][0] = 1;
    for (long long int i = 2; i < 100005; i++) {
      dp[i][0] = (dp[i - 1][0] + dp[i - 1][1]) % 1000000007;
      dp[i][1] = dp[i - 1][0];
    }
    for (long long int i = 1; i < 100005; i++)
      dp[i][0] = (dp[i][0] + dp[i][1]) % 1000000007;
    long long int n, m;
    cin >> n >> m;
    long long int ans =
        (2 * (dp[n][0] + dp[m][0] - 1) + 1000000007) % 1000000007;
    cout << ans << "\n";
  }
  return 0;
}
