#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int n, m;
  cin >> n >> m;
  long long int dp[100005][2];
  dp[0][0] = 1;
  dp[0][1] = 0;
  for (long long int i = 1; i < 100005; i++) {
    dp[i][0] = 0;
    dp[i][1] = 0;
  }
  for (long long int i = 1; i < 100005; i++) {
    dp[i][0] = dp[i - 1][1] % 1000000007;
    dp[i][1] = (dp[i - 1][0] + dp[i - 1][1]) % 1000000007;
  }
  long long int ans1 = 0, ans2 = 0;
  ans1 += (2 * dp[n - 1][1]) % 1000000007;
  ans2 += (2 * dp[m - 1][1]) % 1000000007;
  ans1 += (dp[n - 1][0] % 1000000007);
  ans2 += (dp[m - 1][0] % 1000000007);
  ans1 *= 2;
  ans2 *= 2;
  ans1 %= 1000000007;
  ans2 %= 1000000007;
  long long int ans = (ans1 + ans2 - 2) % 1000000007;
  if (ans < 0) {
    ans = ans + 1000000007;
  }
  { cout << ans % 1000000007 << "\n"; }
}
