#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5, MOD = 1e9 + 7;
int n, m;
long long dp[N];
void read_input() {
  cin >> n >> m;
  dp[1] = 1, dp[2] = 2;
  for (int i = 3; i <= max(n, m); i++)
    dp[i] = dp[i - 1] + dp[i - 2], dp[i] %= MOD;
  cout << 2 * (dp[n] + dp[m] - 1) % MOD << endl;
}
int main() {
  int how_many_times = 1;
  while (how_many_times--) read_input();
  return 0;
}
