#include <bits/stdc++.h>
using namespace std;
int MOD = 1000000007;
int n, m, dp[100005];
int main() {
  scanf("%d", &n), scanf("%d", &m);
  dp[0] = dp[1] = 1;
  for (int i = (2); i <= (100000); i++) dp[i] = (dp[i - 1] + dp[i - 2]) % MOD;
  printf("%d\n",
         2 * (((long long)dp[n] + (long long)dp[m] + MOD - 1) % MOD) % MOD);
  return 0;
}
