#include <bits/stdc++.h>
using namespace std;
long long fib[100005], mod = 1e9 + 7;
void pre() {
  fib[0] = fib[1] = 1;
  for (int i = 2; i < 100005; i++) fib[i] = (fib[i - 1] + fib[i - 2]) % mod;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  pre();
  long long m, n, x;
  cin >> m >> n;
  x = (fib[m] + fib[n] - 1) % mod;
  cout << (2LL * x) % mod;
  return 0;
}
