#include <bits/stdc++.h>
using namespace std;
const long long q = 1e9 + 7;
long long fact(long long x) {
  x++;
  if (x == 1) return 1;
  if (x == 2) return 1;
  long long pr1 = 1, pr2 = 1, ans = 1;
  for (long long i = 3; i <= x; ++i) {
    pr1 = pr2;
    pr2 = ans;
    ans = pr1 + pr2;
    ans %= q;
  }
  return ans;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  cin >> n >> m;
  cout << (2 * (fact(n) + fact(m) - 1)) % q;
  return 0;
}
