#include <bits/stdc++.h>
using namespace std;
vector<int> g[200001];
int vis[200001];
int clr[200001];
bool dfs(int u, int c);
long long int ways(int a, int b, int l);
long long int n, m;
long long int dp[1001][1001][11];
long long int M = 1000000007;
int c[200001];
int val[20001];
int res[200001];
bool b = 1;
int dfs1(int i, int p);
long long int power(long long int a, long long int b);
int stk[200001];
void dfs2(int u, int p);
map<pair<int, int>, int> mp;
long long int fact[300001];
long long int f1[100001];
void f(int n) {
  fact[0] = 1;
  for (int i = 1; i <= n; i++) {
    fact[i] = (fact[i - 1] * i) % M;
  }
}
bool srt1(pair<int, int> p1, pair<int, int> p2) {
  if (p1.first != p2.first) return p1.first < p2.first;
  return p1.second < p2.second;
}
bool srt2(pair<int, int> p1, pair<int, int> p2) {
  if (p1.second != p2.second) return p1.second < p2.second;
  return p1.first < p2.first;
}
int main() {
  cin >> n >> m;
  f1[0] = 1;
  f1[1] = 1;
  for (int i = 2; i <= max(n, m); i++) f1[i] = (f1[i - 1] + f1[i - 2]) % M;
  cout << (2 * f1[n] + 2 * f1[m] - 2 + M) % M << endl;
}
void dfs2(int u, int p) {
  vis[u] = 1;
  stk[u] = 1;
  for (int i : g[u]) {
    if (vis[i] == 0) {
      dfs2(i, u);
    } else {
      if (stk[i] == 1) {
        pair<int, int> p1 = make_pair(u, i);
        int ind = mp[p1];
        res[ind] = 2;
        b = 0;
      }
    }
  }
  stk[u] = 0;
}
int dfs1(int u, int p) {
  int sz = 0;
  for (int i : g[u]) {
    if (i != p) sz = sz + dfs1(i, u);
  }
  if (c[u] > sz) b = 0;
  return sz + 1;
}
bool dfs(int u, int p) {
  int cnt = 0;
  int v = -1;
  for (int i = 1; i <= n; i++) {
    if (val[i] == -1) continue;
    if (cnt == c[u]) {
      v = val[i];
      val[i] = -1;
      break;
    }
    cnt++;
  }
  if (v == -1) return false;
  res[u] = v;
  for (int i : g[u]) {
    if (i != p) {
      if (dfs(i, u) == false) return false;
    }
  }
  return true;
}
long long int power(long long int a, long long int b) {
  long long int res = 1;
  while (b > 0) {
    if (b % 2 == 0) {
      a = (a * a) % M;
      b /= 2;
    } else {
      res = (res * a) % M;
      b--;
    }
  }
  return res;
}
