#include <bits/stdc++.h>
using namespace std;
long long n, d[100007], x, a, b, y;
int main() {
  cin >> a >> b;
  if (a < b) swap(a, b);
  d[1] = 2;
  d[2] = 4;
  for (int i = 3; i <= a; i++) {
    d[i] = d[i - 1] + d[i - 2];
  }
  cout << (d[a] + d[b] - 2) % 1000000007;
  return 0;
}
