#include <bits/stdc++.h>
using namespace std;
int n, m;
long long f[100009][2];
signed main() {
  scanf("%d%d", &n, &m);
  f[1][0] = 1;
  f[1][1] = 1;
  f[2][1] = 2;
  f[2][0] = 2;
  for (int i = 3; i <= max(n, m); i++) {
    f[i][0] = (f[i - 1][1] + f[i - 2][1]) % 1000000007;
    f[i][0] %= 1000000007;
    f[i][1] = (f[i - 1][0] + f[i - 2][0]) % 1000000007;
    f[i][1] %= 1000000007;
  }
  printf("%lld\n", ((f[n][0] + f[n][1]) % 1000000007 +
                    (f[m][0] + f[m][1]) % 1000000007 - 2 + 1000000007) %
                       1000000007);
  return 0;
}
