#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1e9 + 7;
long long a[100005];
long long power(long long x, long long p) {
  long long res = 1;
  while (p) {
    if (p & 1) res = (res % MOD * x % MOD) % MOD;
    x = (x % MOD * x % MOD) % MOD;
    p >>= 1;
  }
  return res;
}
int main() {
  long long n, m;
  scanf("%lld%lld", &n, &m);
  a[1] = 2;
  a[2] = 4;
  for (int i = 3; i < 100005; i++) {
    a[i] += (a[i - 1] + a[i - 2]) % MOD;
  }
  printf("%lld", (a[n] + a[m] - 2) % MOD);
  return 0;
}
