#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 100;
long long fib[N];
long long mult(long long a, long long b) { return a * b % 1000000007; }
long long fastpow(long long n, long long k) {
  long long ret = 1;
  while (k) {
    if (k & 1) ret = mult(ret, n);
    n = mult(n, n);
    k /= 2;
  }
  return ret;
}
int main() {
  fib[1] = 2, fib[2] = 4;
  for (int i = 3; i <= 1e5; i++)
    fib[i] = (fib[i - 1] + fib[i - 2]) % 1000000007;
  long long n, m;
  cin >> n >> m;
  long long ans = (fib[m] + fib[n] - 2 + 1000000007) % 1000000007;
  cout << ans << endl;
  cin >> n;
}
