#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int MAXN = 1e6 + 10;
double PI = 3.1415926535898;
long long a[MAXN];
int main() {
  int n, m;
  cin >> n >> m;
  a[0] = 1;
  a[1] = 1;
  for (int i = 2; i <= 100000; i++) {
    a[i] = (a[i - 1] + a[i - 2]) % 1000000007;
  }
  cout << 2 * (a[n] + a[m] - 1) % 1000000007 << endl;
}
