#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, m;
  cin >> n >> m;
  long long fib[100005];
  fib[0] = 0;
  fib[1] = 1;
  fib[2] = 2;
  for (long long i = 3; i <= 100000; i++) {
    fib[i] = (fib[i - 1] + fib[i - 2]) % 1000000007;
  }
  long long ans = (2 * (fib[n] + fib[m] - 1) % 1000000007) % 1000000007;
  cout << ans << endl;
}
