#include <bits/stdc++.h>
long long mod = 1e9 + 7;
long long a[100005], s[100005];
using namespace std;
int main(void) {
  long long n, m;
  a[0] = 1, a[1] = 1, a[2] = 2;
  while (cin >> n >> m) {
    if (n < m) swap(n, m);
    for (int i = 3; i <= n; i++) {
      a[i] = (a[i - 1] + a[i - 2]) % mod;
    }
    s[1] = a[n];
    for (int i = 2; i <= m; i++) {
      s[i] = (s[i - 1] + a[i - 2]) % mod;
    }
    cout << 2 * s[m] << endl;
  }
  return 0;
}
