#include <bits/stdc++.h>
using namespace std;
const int N = 100002;
const int p = 1e9 + 7;
int n, m;
long long f[N];
void read(int &x) { scanf("%d", &x); }
void init() {
  f[1] = 1;
  f[2] = 2;
  for (int i = (3); i < (N); i++) f[i] = (f[i - 1] + f[i - 2]) % p;
}
int main() {
  init();
  read(n);
  read(m);
  printf("%lld\n", ((f[n] + f[m]) % p * 2 % p + p - 2) % p);
  return 0;
}
