#include <bits/stdc++.h>
using namespace std;
long long pr[400005];
int main() {
  long long ans = 0;
  long long dp[200005] = {0};
  dp[1] = 1;
  dp[2] = 2;
  for (long long i = 3; i < 200005; i++) {
    dp[i] = dp[i - 1] + dp[i - 2];
    dp[i] %= 1000000007;
  }
  long long a, b;
  cin >> a >> b;
  ans = (dp[a] + dp[b] - 1);
  ans = ans % 1000000007;
  ans = 2 * ans;
  ans %= 1000000007;
  ans = ans + 1000000007;
  ans %= 1000000007;
  cout << ans << endl;
  return 0;
}
