#include <bits/stdc++.h>
using namespace std;
const int N = 1e5, P = 1e9 + 7;
int n, m;
int f[N + 5];
int main() {
  f[0] = f[1] = 1;
  for (int i = 2; i <= N; i++) f[i] = (f[i - 2] + f[i - 1]) % P;
  scanf("%d%d", &n, &m);
  printf("%d\n", f[n] + f[m] - 1 << 1);
}
