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