#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
const int INF = 0x3f3f3f3f;
const long long LINF = 0x3f3f3f3f3f3f3f3f;
long long arr[100100];
long long calc(int n) {
  arr[0] = 1;
  arr[1] = 1;
  for (int i = 2; i <= n; i++) {
    arr[i] = (arr[i - 1] + arr[i - 2]) % MOD;
  }
  return arr[n];
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  printf("%lld\n", (calc(n) + calc(m) + 3) % MOD);
  return 0;
}
