#include <bits/stdc++.h>
using namespace std;
const long long logN = 20;
const long long M = 1000000007;
const long long INF = 1e12;
int pow1(int a, int b) {
  int res = 1;
  while (b > 0) {
    if (b & 1) {
      res = res * a;
    }
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long f[100005];
int main() {
  long long t = 1;
  while (t--) {
    long long n, m;
    cin >> n >> m;
    f[0] = 1;
    f[1] = 1;
    for (int i = 2; i <= 100005; i++) {
      f[i] = f[i - 1] + f[i - 2];
      f[i] %= M;
    }
    int ans = (f[n] + f[m] - 1 + M) % M;
    ans = (ans * 2ll) % M;
    cout << ans;
  }
}
