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