#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long dp1[100001], dp2[100001];
int main() {
  int n, m;
  long long ans = 0;
  cin >> n >> m;
  dp1[0] = 2;
  for (int i = 1; i < n; i++) {
    if (i > 0) dp1[i] = (dp1[i] + dp1[i - 1]) % mod;
    if (i > 1) dp1[i] = (dp1[i - 2] + dp1[i]) % mod;
  }
  dp2[0] = 2;
  for (int i = 1; i < m; i++) {
    if (i > 0) dp2[i] = (dp2[i] + dp2[i - 1]) % mod;
    if (i > 1) dp2[i] = (dp2[i - 2] + dp2[i]) % mod;
  }
  ans = (dp1[n - 1] + dp2[m - 1] - 2) % mod;
  if (n > 1) ans = (ans + dp1[n - 2]) % mod;
  if (m > 1) ans = (ans + dp2[m - 2]) % mod;
  cout << ans;
}
