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