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