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