#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, i, f = 0;
  cin >> n;
  long long int a[n + 1];
  vector<long long int> b;
  for (i = 1; i <= n; i++) cin >> a[i];
  if (n == 1) {
    cout << n;
    return 0;
  } else if (n == 2) {
    cout << n;
    return 0;
  } else {
    for (i = 1; i <= n - 2; i++) {
      if (a[i] + a[i + 1] == a[i + 2]) {
        f++;
        b.push_back(f);
      } else {
        f = 0;
        b.push_back(f);
      }
    }
    for (i = 1; i < b.size(); i++) {
      if (b[0] < b[i]) swap(b[0], b[i]);
    }
    cout << b[0] + 2;
    return 0;
  }
}
