#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100;
const int MOD = 1e9 + 7;
int n, m, f[N];
int main() {
  scanf("%d %d", &n, &m);
  f[0] = 2;
  f[1] = 2;
  for (int i = 2; i <= max(n, m); ++i) f[i] = (f[i - 1] + f[i - 2]) % MOD;
  int ans = f[n] + f[m] - 2;
  if (ans < 0)
    ans += MOD;
  else
    ans %= MOD;
  printf("%d\n", ans);
}
