#include <bits/stdc++.h>
using namespace std;
long long n, m, f[100010][3], ans[100010];
int main() {
  cin >> n >> m;
  f[1][0] = 1;
  f[1][1] = 1;
  f[2][0] = 2;
  f[2][1] = 2;
  ans[1] = 2;
  ans[2] = 4;
  for (int i = 3; i <= max(n, m); ++i) {
    f[i][1] = f[i - 1][0] + f[i - 2][0] % 1000000007;
    f[i][0] = f[i - 1][1] + f[i - 2][1] % 1000000007;
    ans[i] = f[i][0] + f[i][1] % 1000000007;
  }
  cout << ans[n] + ans[m] - 2 + 1000000007 % 1000000007 << endl;
  return 0;
}
