#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
bool mod(long double a, long double b) { return a / b - floor(a / b); }
long long occurs(vector<long long> v, long long n) {
  auto it = lower_bound(((v)).begin(), ((v)).end(), (n));
  auto it1 = upper_bound(((v)).begin(), ((v)).end(), (n));
  long long first = it1 - it;
  return first;
}
long long logb(long long base, long long first) {
  return (log(first) / log(base));
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long i, j, first, second;
  long long fib[100005];
  fib[0] = 1;
  fib[1] = 1;
  for (i = 2; i < 100005; i++) {
    fib[i] = fib[i - 1] + fib[i - 2];
  }
  cin >> first >> second;
  cout << 2 * (fib[first] + fib[second] - 1);
  return 0;
}
