#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, no, no1, mx = -100, c;
  vector<int> v, v1, fb;
  cin >> n;
  cin >> no >> no1;
  v.push_back(no);
  v.push_back(no1);
  if (n == 2) {
    cout << "2";
    return 0;
  } else if (n == 1) {
    cout << "1";
    return 0;
  }
  fb.push_back(-1);
  fb.push_back(-1);
  for (i = 2; i < n; i++) {
    cin >> no;
    v.push_back(no);
    fb.push_back(v[i - 1] + v[i - 2]);
  }
  c = 2;
  for (i = 2; i < n; i++) {
    if (fb[i] == v[i]) {
      c++;
    } else {
      c = 2;
    }
    mx = max(mx, c);
  }
  if (mx != -100)
    cout << mx;
  else
    cout << n;
}
