#include <bits/stdc++.h>
using namespace std;
int n, m;
const long long int mod = 1000000007LL;
long long int fib[100005];
void pre() {
  fib[1] = 1LL;
  fib[2] = 2LL;
  for (int i = 3; i <= 100005; i++) fib[i] = (fib[i - 1] + fib[i - 2]) % mod;
}
int main() {
  ios_base::sync_with_stdio(0);
  ;
  pre();
  cin >> n >> m;
  long long int ans = 2LL * fib[n] + 2LL * fib[m] - 2LL;
  ans %= mod;
  cout << ans << "\n";
  return 0;
}
