#include <bits/stdc++.h>
#pragma G++ optimize "O2"
#pragma GCC optimize "O2"
#pragma G++ optimize "O3"
#pragma GCC optimize "O3"
#pragma G++ optimize "Ofast"
#pragma GCC optimize "Ofast"
using namespace std;
long long n, m;
long long liestart = 2;
const int maxn = 100010;
;
const int mod = 1e9 + 7;
long long addment[maxn];
long long mamn;
int main() {
  scanf("%lld%lld", &n, &m);
  if (n > m) swap(n, m);
  addment[1] = 2;
  addment[2] = 2;
  mamn = max(n, m);
  for (register int i = 3; i <= mamn + 2; i++) {
    addment[i] = (addment[i - 1] + addment[i - 2]) % mod;
  }
  for (register int i = 2; i <= n; i++) {
    liestart = (liestart + addment[i - 1]) % mod;
  }
  for (register int i = 2; i <= m; i++) {
    liestart = (liestart + addment[i - 1]) % mod;
  }
  printf("%lld\n", liestart);
  return 0;
}
