#include <bits/stdc++.h>
using namespace std;
const long long p = 1e9 + 7;
const long long N = 2e5 + 10;
const long long inf = 1e18 + 10;
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m;
  cin >> n >> m;
  long long fib[N] = {0};
  fib[1] = 1;
  for (long long i = 2; i < N; i++) {
    fib[i] = (fib[i - 1] + fib[i - 2]) % p;
  }
  cout << (((fib[n + 1] + fib[m + 1]) % p - 1 + p) % p) * 2 % p;
}
