#include <bits/stdc++.h>
#pragma GCC optimize(3, "Ofast", "inline")
using namespace std;
const long long mod = 1e9 + 7;
const long long maxn = 1e6 + 5;
long long N[100005];
int main() {
  N[1] = 2, N[2] = 4;
  for (long long i = 3; i <= 100000; i++) {
    N[i] = N[i - 1] + N[i - 2];
    N[i] %= mod;
  }
  long long n, m;
  cin >> n >> m;
  long long ans = (N[m] + (N[n] - N[1]) % mod) % mod;
  cout << ans << "\n";
}
