#include <bits/stdc++.h>
using namespace std;
long long nx2(long long n) {
  long long p = 1;
  if (n && !(n & (n - 1))) return n;
  while (p < n) p <<= 1;
  return p;
}
namespace Debug {
void dout() { cerr << "\n"; }
template <typename Head, typename... Tail>
void dout(Head H, Tail... T) {
  cerr << " " << H;
  dout(T...);
}
template <typename T>
void douta(const T *a, int n) {
  cerr << "\n[";
  for (int i = 0; i < n; i++) {
    cerr << " " << a[i];
  }
  cerr << " ]\n";
}
template <typename T>
void doutaa(T **b, int r, int c) {
  for (int i = 0; i < r; i++) {
    cerr << "[";
    for (int j = 0; j < c; j++) {
      cerr << " " << b[i][j];
    }
    cerr << " ]\n";
  }
}
template <typename T>
void dout(const vector<T> v) {
  cerr << "\n[";
  for (T i : v) {
    cerr << " " << i;
  }
  cerr << " ]\n";
}
template <typename T>
void dout(const vector<vector<T>> v) {
  cerr << "\n";
  for (vector<T> u : v) {
    cerr << "[";
    for (T i : u) {
      cerr << " " << i;
    }
    cerr << " ]\n";
  }
}
template <typename F, typename S>
void dout(const vector<pair<F, S>> u) {
  cerr << "\n";
  for (pair<F, S> v : u) {
    cerr << "[ " << v.first << " " << v.second << " ]\n";
  }
}
}  // namespace Debug
using namespace Debug;
const int N = 1e5 + 69, mod = 1e9 + 7;
int dp[N], n, m;
int fib(int x) {
  if (dp[x] != -1) {
    return dp[x];
  }
  return dp[x] = (fib(x - 1) + fib(x - 2)) % mod;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  memset((dp), -1, sizeof(dp));
  dp[0] = 1;
  dp[1] = 1;
  cin >> n >> m;
  cout << ((2 * ((fib(n) + fib(m)) % mod - 1)) % mod) << '\n';
}
