#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long int dp[100001][2] = {};
  dp[0][0] = 1;
  dp[1][0] = 1;
  dp[1][1] = 0;
  for (int i = 2; i <= 100000; i++) {
    dp[i][0] = dp[i - 1][0] + dp[i - 1][1];
    dp[i][1] = dp[i - 2][0] + dp[i - 2][1];
    dp[i][0] %= 1000000007;
    dp[i][1] %= 1000000007;
  }
  int test = 1;
  while (test--) {
    long long int n, m;
    cin >> n >> m;
    cout << ((dp[n][0] + dp[n][1] + dp[m][0] + dp[m][1] - 1) * 2) % 1000000007;
  }
  return 0;
}
