#include <bits/stdc++.h>
using namespace std;
const long long maxn = 22;
long long b[maxn];
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) cin >> a[i];
  long long lm = 0;
  long long gm = INT_MIN;
  for (long long i = 2; i < n; ++i) {
    if (a[i] == a[i - 1] + a[i - 2]) {
      lm++;
      if (lm > gm) gm = max(lm, gm);
    } else
      lm = 0;
  }
  if (gm > 0)
    cout << gm + 2 << '\n';
  else if (n > 1)
    cout << 2 << '\n';
  else
    cout << 1 << '\n';
  return 0;
}
