#include <bits/stdc++.h>
using namespace std;
long long n, m;
long long dp[100005][2];
long long cal(long long x) {
  if (x == 1) return 1;
  dp[1][0] = 1;
  dp[1][1] = 0;
  for (int i = 2; i <= x; i++) {
    dp[i][0] = (dp[i - 1][1] + dp[i - 1][0]) % 1000000007;
    dp[i][1] = dp[i - 1][0];
  }
  return (dp[x][1] + dp[x][0]) % 1000000007;
}
int main() {
  cin >> n >> m;
  cout << 2 * (1 + cal(n) - 1 + cal(m) - 1) % 1000000007 << endl;
  return 0;
}
