#include <bits/stdc++.h>
using namespace std;
int n, m;
int f[((int)201 * 1000)];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m;
  f[1] = 2;
  f[2] = 4;
  for (int i = 3; i <= max(n, m); i++)
    f[i] = (f[i - 1] + f[i - 2]) % ((int)1e9 + 7);
  cout << (1LL * f[m] - 2 + ((int)1e9 + 7) + f[n]) % ((int)1e9 + 7);
  return 0;
}
