#include <bits/stdc++.h>
using namespace std;
long long fib(int n) {
  if (n == 1) {
    return 1;
  } else {
    long long a = 1, b = 1, c = 1;
    for (int i = 0; i <= n - 2; i++) {
      c = (a + b);
      b = a;
      a = c;
    }
    return c % int(1e9 + 7);
  }
}
int main(void) {
  cin.tie(0)->sync_with_stdio(0);
  int x, y;
  cin >> x >> y;
  cout << 2 * (fib(x) + fib(y) - 1) % int(1e9 + 7) << "\n";
  return 0;
}
