#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int X = 0, w = 0;
  char ch = 0;
  while (!isdigit(ch)) {
    w |= ch == '-';
    ch = getchar();
  }
  while (isdigit(ch)) X = (X << 3) + (X << 1) + (ch ^ 48), ch = getchar();
  return w ? -X : X;
}
const int maxn = 1e5 + 10;
const int mod = 1e9 + 7;
int dp[maxn];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, m;
  cin >> n >> m;
  dp[1] = 2;
  dp[2] = 4;
  for (int i = 3; i <= max(n, m); ++i) {
    dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
  }
  cout << (dp[n] + dp[m] - 2) % mod << endl;
  return 0;
}
