#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long dp[100000 + 5][2];
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0);
  cin >> n >> m;
  dp[0][0] = 2;
  for (long long i = 1; i <= max(n, m); i++) {
    dp[i][0] = dp[i - 1][1];
    dp[i][1] = (dp[i - 1][0] + dp[i - 1][1]) % 1000000007;
  }
  cout << (dp[n][0] + dp[n][1] + dp[m][0] + dp[m][1] + 1000000007 - 2) %
              1000000007
       << endl;
  return 0;
}
