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