#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int N = 1e5 + 7;
int m, n;
long long a[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  if (fopen("test.inp", "r"))
    freopen("test.inp", "r", stdin), freopen("test.out", "w", stdout);
  cin >> m >> n;
  if (m > n) swap(m, n);
  a[1] = 2;
  a[2] = 4;
  for (int i = 3; i <= n; i++) a[i] = (a[i - 1] + a[i - 2]) % mod;
  cout << (a[m] + a[n] - 2 + mod) % mod;
}
