#include <bits/stdc++.h>
using namespace std;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
long long power(long long a, long long b) {
  if (b < 0) return 1;
  long long res = 1;
  while (b) {
    if (b & 1) res = (res * a);
    a = (a * a);
    b >>= 1;
  }
  return res;
}
template <class T, class U>
void chmin(T& t, const U& u) {
  if (t > u) t = u;
}
template <class T, class U>
void chmax(T& t, const U& u) {
  if (t < u) t = u;
}
bool ispoweroftwo(long long x) { return (x && !(x & (x - 1))); }
long long GCD(long long a, long long b) {
  long long r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long LCM(long long a, long long b) { return a / GCD(a, b) * b; }
const long long inf = 1e9;
const long long INF = 1e18;
const long double pi = 3.141592653589793238;
long long dx[] = {-1, 0, 1, 0};
long long dy[] = {0, 1, 0, -1};
char MV[] = {'U', 'R', 'D', 'L'};
long long f[100009];
void solve() {
  long long n, m;
  cin >> n >> m;
  long long l = f[n], r = f[m];
  l *= 2;
  l %= 1000000007;
  r *= 2;
  r %= 1000000007;
  cout << ((l % 1000000007 + r % 1000000007) % 1000000007 - 2 + 1000000007) %
              1000000007
       << '\n';
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  f[0] = f[1] = 1;
  for (long long i = 2; i <= 100005; ++i) {
    f[i] += (f[i - 1] + f[i - 2]) % 1000000007;
    f[i] %= 1000000007;
  }
  solve();
  return 0;
}
