#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 100, MOD = 1000 * 1000 * 1000 + 7;
int sum(int a, int b) {
  a += b;
  if (a < 0)
    a += MOD;
  else if (a >= MOD)
    a -= MOD;
  return a;
}
void _sum(int &a, int b) { a = sum(a, b); }
int mul(int a, int b) { return 1LL * a * b % MOD; }
void _mul(int &a, int b) { a = mul(a, b); }
int power(int a, int b) {
  int res = 1;
  while (b) {
    if (b & 1) _mul(res, a);
    _mul(a, a);
    b >>= 1;
  }
  return res;
}
int n, m, dp[N];
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  dp[0] = dp[1] = 1;
  for (int i = 2; i < N; i++) dp[i] = sum(dp[i - 1], dp[i - 2]);
  cin >> n >> m;
  cout << sum(2, mul(2, sum(dp[n], sum(dp[m], -2))));
  return 0;
}
