#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const long long P = 1e9 + 7;
int n, m;
long long f[N][2];
int main() {
  cin >> n >> m;
  if (n < m) swap(n, m);
  f[1][0] = 2;
  for (int i = 2; i <= n; i++)
    f[i][0] = (f[i - 1][0] + f[i - 1][1]) % P, (f[i][1] += f[i - 1][0]) %= P;
  cout << (f[n][0] + f[n][1] - 2 + (f[m][0] + f[m][1])) % P << endl;
  return 0;
}
