#include <bits/stdc++.h>
using namespace std;
long long dp[100010][2], mo = 1e9 + 7;
int main() {
  int i, n, m;
  scanf("%d%d", &n, &m);
  dp[1][0] = dp[1][1] = dp[0][0] = dp[0][1] = 1;
  for (i = 2; i <= 100000; i++) {
    dp[i][0] = (dp[i - 1][1] + dp[i - 2][1]) % mo;
    dp[i][1] = (dp[i - 1][0] + dp[i - 2][0]) % mo;
  }
  long long ans = dp[n][0] + dp[n][1] + dp[m][0] + dp[m][1];
  cout << (ans - 2 + mo) % mo << endl;
}
