#include <bits/stdc++.h>
using namespace std;
template <typename T>
T modpow(T base, T exp, T modulus) {
  base %= modulus;
  T result = 1;
  while (exp > 0) {
    if (exp & 1) result = (result * base) % modulus;
    base = (base * base) % modulus;
    exp >>= 1;
  }
  return result;
}
template <class T>
bool uin(T &a, T b) {
  return a > b ? (a = b, true) : false;
}
template <class T>
bool uax(T &a, T b) {
  return a < b ? (a = b, true) : false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n, m;
  cin >> n >> m;
  long long fib[100100];
  fib[0] = 1;
  fib[1] = 1;
  for (int i = (int)(2); i <= (int)(100000); ++i) {
    fib[i] = (fib[i - 1] + fib[i - 2]) % 1000000007;
  }
  cout << 2 * (fib[n] + fib[m - 1]) << endl;
  return 0;
}
