#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
constexpr int max(int& x, int& y) { return x > y ? x : y; }
int a[100001] = {0, 1, 2, 3, 5};
int main() {
  int n, m;
  cin >> n >> m;
  int Up = max(n, m);
  for (int i = 5; i <= Up; i++) {
    a[i] = (a[i] + a[i - 1]) % mod;
    a[i] = (a[i] + a[i - 2]) % mod;
  }
  cout << (a[n] + a[m] - 1) * 2 << endl;
}
