#include <bits/stdc++.h>
using namespace std;
long long mod = 1000000007;
long long ara[100009];
int main() {
  ara[1] = 2;
  ara[2] = 4;
  for (int i = 3; i < 100009; i++) {
    ara[i] = (ara[i - 1] % mod + ara[i - 2] % mod) % mod;
    ara[i] = ara[i] % mod;
  }
  long long x, y;
  cin >> x >> y;
  if (x > y) swap(x, y);
  long long ans = ara[x] + ara[y] - 2;
  ans = ans % mod;
  cout << ans;
}
