#include <bits/stdc++.h>
using namespace std;
int n, arr[100005];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  int cur = min(2, n);
  int best = min(2, n);
  for (int i = 2; i < n; i++) {
    if (arr[i - 2] + arr[i - 1] == arr[i])
      cur++;
    else
      cur = 2;
    best = max(best, cur);
  }
  cout << best << endl;
}
