#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
const int mod = 1e9 + 7;
int n, m;
long long a[maxn];
int main() {
  cin >> n >> m;
  a[0] = a[1] = 2;
  for (int i = 2; i <= 100000; i++) a[i] = (a[i - 1] + a[i - 2]) % mod;
  cout << (a[n] + a[m] - 2 + mod) % mod;
}
