#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7, N = 1e5 + 5;
int n, m, f[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m;
  if (n < m) swap(n, m);
  f[0] = f[1] = 1;
  for (int i = 2; i <= n; i++) f[i] = (f[i - 2] + f[i - 1]) % mod;
  printf("%d\n", 2 * (f[n] + f[m] - 1ll + mod) % mod);
  return 0;
}
