#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
void solve() {
  int n, m;
  scanf("%d %d", &n, &m);
  int dp[100005];
  dp[1] = 2;
  dp[2] = 4;
  for (int i = 3; i <= max(m, n); i++) {
    dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
  }
  int ans = (dp[n] + dp[m] - 2 + mod) % mod;
  printf("%d", ans);
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
