#include <bits/stdc++.h>
using namespace std;
long long n, p[100100], a, b, mod = 1000000007;
int main() {
  scanf("%lld %lld", &a, &b);
  p[0] = 1;
  p[1] = 1;
  for (long long i = 2; i <= 100000; i++) p[i] = (p[i - 1] + p[i - 2]) % mod;
  cout << 2 * (p[a] + p[b] - 1) % mod;
}
