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