#include <bits/stdc++.h>
using namespace std;
int a[100010];
int mod = 1e9 + 7;
int main() {
  int i, j, k, x, y, z, n, m;
  scanf("%d%d", &n, &m);
  a[1] = 2;
  a[2] = 4;
  if (n < m) {
    swap(n, m);
  }
  for (i = 3; i <= n; i++) {
    a[i] = a[i - 1] + a[i - 2];
    a[i] = a[i] % mod;
  }
  printf("%d", (a[n] + a[m] - 2) % mod);
}
