#include <bits/stdc++.h>
using namespace std;
ifstream in("input.in");
ofstream out("output.out");
const long long nmx = 2e5 + 5;
const long long inf = 1 << 30;
const long long MOD = 1e9 + 7;
const long long dx[4] = {-1, 0, 1, 0};
const long long dy[4] = {0, 1, 0, -1};
const string YES = "YES";
const string NO = "NO";
int main() {
  ios::sync_with_stdio(0);
  long long fib[nmx];
  long long n, m;
  cin >> n >> m;
  fib[0] = fib[1] = 1;
  for (int i = 2; i < nmx; ++i) fib[i] = (fib[i - 1] + fib[i - 2]) % MOD;
  cout << (1ULL * 2 *
           ((1ULL * fib[n] + 1ULL * fib[m] - 1ULL * 1 + MOD) % MOD)) %
              MOD;
  return 0;
}
