#include <bits/stdc++.h>
const double eps = (1e-9);
using namespace std;
int dcmp(long double a, long double b) {
  return fabsl(a - b) <= eps ? 0 : (a > b) ? 1 : -1;
}
int getBit(long long num, int idx) { return ((num >> idx) & 1ll) == 1; }
int setBit1(int num, int idx) { return num | (1 << idx); }
long long setBit0(long long num, int idx) { return num & ~(1ll << idx); }
long long flipBit(long long num, int idx) { return num ^ (1ll << idx); }
void M() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int countNumBit1(int mask) {
  int ret = 0;
  while (mask) {
    mask &= (mask - 1);
    ++ret;
  }
  return ret;
}
const int mod = 1e9 + 7, N = 100000 + 9;
long long mem[N];
long long solve(int n) {
  if (n <= 0) {
    return 1;
  }
  long long &ret = mem[n];
  if (ret != -1) {
    return ret;
  }
  long long ans = 0;
  ans += solve(n - 1) % mod;
  if (ans >= mod) ans -= mod;
  ans += solve(n - 2) % mod;
  if (ans >= mod) ans -= mod;
  return ret = ans;
}
int main() {
  M();
  int n, m;
  cin >> n >> m;
  memset(mem, -1, sizeof(mem));
  cout << ((((solve(n - 1) + solve(m - 1)) % mod) - 1 % mod + mod) % mod) * 2 %
              mod
       << endl;
}
