#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int t = 1;
  while (t--) {
    int n, m;
    cin >> n >> m;
    const int N = 1e5 + 5;
    long long int f[N];
    f[0] = 1;
    f[1] = 1;
    for (int i = 2; i < N; i++) {
      f[i] = (f[i - 1] + f[i - 2]) % 1000000007;
    }
    long long int ans;
    if (n == 1) {
      ans = 2 * f[m];
      goto task;
    }
    if (m == 1) {
      ans = 2 * f[n];
      goto task;
    }
    ans = (2 * f[m] - 2 + 2 * f[n]) % 1000000007;
  task:
    cout << ans % 1000000007 << '\n';
  }
  return 0;
}
