#include <bits/stdc++.h>
#pragma GCC optimize(2)
#pragma GCC optimize(3)
using namespace std;
template <class nmsl>
inline void read(nmsl &x) {
  x = 0;
  char ch = getchar(), w = 0;
  while (!isdigit(ch)) w = (ch == '-'), ch = getchar();
  while (isdigit(ch)) x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  x = w ? -x : x;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, m;
  cin >> n >> m;
  long long mod = 1000000007;
  int dp[100000];
  dp[1] = 2;
  dp[2] = 4;
  for (int i = 3; i <= max(n, m); i++) {
    dp[i] = (dp[i - 1] % mod + dp[i - 2] % mod) % mod;
  }
  cout << (dp[n] % mod + dp[m] % mod - 2 % mod) % mod;
  return 0;
}
