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