#include <bits/stdc++.h>
using namespace std;
int main() {
  long long ans = 2;
  int n;
  cin >> n;
  vector<int> vc;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n > 2) {
    for (int i = 2; i < n; i++) {
      if (a[i] == a[i - 1] + a[i - 2]) {
        ans++;
        if (i == n - 1) {
          vc.push_back(ans);
          ans = 2;
          break;
        }
      } else if (a[i] != a[i - 1] + a[i - 2] || i == n - 1) {
        vc.push_back(ans);
        ans = 2;
        continue;
      }
    }
    sort(vc.begin(), vc.end());
    cout << vc[vc.size() - 1] << endl;
  } else {
    if (n == 1) {
      cout << 1 << endl;
    }
    if (n == 2) {
      cout << 2 << endl;
    }
  }
}
