#include <bits/stdc++.h>
using namespace std;
const int Mod = 1e9 + 7;
long long fib[111111], m, n;
int main() {
  fib[1] = 1, fib[2] = 2;
  for (int i = 3; i <= 100000; i++) {
    fib[i] = fib[i - 1] + fib[i - 2] % Mod;
  }
  cin >> n >> m;
  cout << 2 * ((fib[n] + fib[m]) % Mod - 1 + Mod) % Mod << endl;
}
