#include <bits/stdc++.h>
using namespace std;
long long int n, m, ans;
long long int MOD = 1e9 + 7;
unsigned long long int F[100100];
int main() {
  cin >> n >> m;
  F[1] = 1;
  F[2] = 2;
  for (int i = 3; i < 100005; i++) {
    F[i] = F[i - 1] + F[i - 2];
  }
  ans = 2 * (F[n] + F[m] - 1);
  cout << (ans + MOD) % (MOD);
  return 0;
}
