#include <bits/stdc++.h>
using namespace std;
long long md = 1000000007;
vector<long long> dp(100009, -1);
long long f(long long n) {
  if (n == 0) return 0;
  if (n == 1) return 1;
  if (n == 2) return 2;
  if (dp[n] != -1) return dp[n];
  return dp[n] = ((f(n - 1)) % md + (f(n - 2)) % md) % md;
}
void solve() {
  long long n, m;
  cin >> n >> m;
  cout << 2 * (f(n) + f(m) - 1);
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  int test_cases = 1;
  while (test_cases--) {
    solve();
  }
  return 0;
}
