#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int n, m;
int dp[200005][2][2];
int main() {
  scanf("%d%d", &n, &m);
  dp[2][0][0] = 1;
  dp[2][0][1] = 1;
  dp[2][1][0] = 1;
  dp[2][1][1] = 1;
  dp[1][1][0] = 1;
  dp[1][0][0] = 1;
  for (int i = 3; i <= max(n, m); i++) {
    dp[i][0][0] = dp[i - 1][0][1] % mod;
    dp[i][1][0] = (dp[i - 1][0][0] + dp[i - 1][0][1]) % mod;
    dp[i][0][1] = (dp[i - 1][1][1] + dp[i - 1][1][0]) % mod;
    dp[i][1][1] = dp[i - 1][1][0] % mod;
  }
  if (n == 1 && m == 1)
    printf("2");
  else
    printf("%d",
           ((dp[n][0][0] + dp[n][1][0] + dp[n][0][1] + dp[n][1][1]) % mod +
            (dp[m][0][0] + dp[m][1][0] + dp[m][0][1] + dp[m][1][1]) % mod - 2 +
            mod) %
               mod);
}
