#include <bits/stdc++.h>
using namespace std;
typedef vector<pair<long long, long long> > vpll;
const int M = 1e5 + 7;
const int N = 1e6 + 7;
const long long inf = 1e18;
const int mod = 1e9 + 7;
int n, m;
long long fib[M];
void go() {
  cin >> n >> m;
  fib[0] = 1;
  fib[1] = 1;
  for (int i = 2; i < max(n, m) + 1; i++)
    fib[i] = (fib[i - 1] + fib[i - 2]) % mod;
  cout << 2 * (fib[n] + fib[m] - 1) << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int tst = 1;
  for (int i = 0; i < tst; i++) go();
  return 0;
}
