#include <bits/stdc++.h>
using namespace std;
const int mm = 1000000007;
int i, j, k, n, m, ans, f[210001];
int main() {
  scanf("%d%d", &n, &m);
  if (n < m) swap(n, m);
  for (f[1] = 2, f[2] = 4, i = 3; i <= n; i++)
    f[i] = (f[i - 1] + f[i - 2]) % mm;
  ans = f[n] + f[m] - 2;
  ans %= mm;
  printf("%d\n", ans);
  return 0;
}
