#include <bits/stdc++.h>
using namespace std;
long long powermodm(long long x, long long n, long long M) {
  long long result = 1;
  while (n > 0) {
    if (n % 2 == 1) result = (result * x) % M;
    x = (x * x) % M;
    n = n / 2;
  }
  return result;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, m;
  cin >> n >> m;
  vector<long long> fibo(100005);
  fibo[0] = 1;
  fibo[1] = 1;
  for (long long i = 2; i <= 100000; i++)
    fibo[i] = (fibo[i - 1] + fibo[i - 2]) % 1000000007;
  cout << (2 * (fibo[n] + fibo[m] - 1)) % 1000000007;
}
