#include <bits/stdc++.h>
using namespace std;
const int N = 1e9 + 7;
long long a[100001];
int main() {
  long long n, m;
  cin >> n >> m;
  a[1] = 2;
  a[2] = 4;
  for (int i = 3; i <= max(n, m); i++) {
    a[i] = (a[i - 1] % N + a[i - 2] % N) % N;
  }
  cout << (a[n] + a[m] - 2) % N;
}
