#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("unroll-loops")
using namespace std;
const double pi = acos(-1);
bool isVowel(char ch) {
  if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u') {
    return 1;
  }
  return 0;
}
bool compare(pair<long long, long long> a, pair<long long, long long> b) {
  return a.second < b.second;
}
map<long long, long long> m;
bool isPrime(long long n) {
  for (long long i = 3; i * i <= n; i += 2) {
    if (n % i == 0) {
      return false;
    }
  }
  return true;
}
long long fib(long long n) {
  long long f[n + 2];
  long long i;
  f[0] = 0;
  f[1] = 1;
  for (i = 2; i <= n; i++) {
    f[i] = (f[i - 1] + f[i - 2]) % 1000000007;
  }
  return f[n];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    long long a, b;
    cin >> a >> b;
    long long ans = fib(a + 1) + fib(b + 1) - 1;
    cout << 2 * ans << endl;
  }
}
