#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
int main() {
  int x;
  cin >> x;
  vector<long long> v(x);
  for (int i = 0; i < x; i++) cin >> v[i];
  if (x == 1) {
    cout << 1;
  } else if (x == 2) {
    cout << 2;
  } else {
    int maxi = 2;
    int cnt = 2;
    for (int i = 2; i < x; i++) {
      if (v[i] == v[i - 1] + v[i - 2])
        ++cnt;
      else
        cnt = 2;
      maxi = max(cnt, maxi);
    }
    cout << maxi << endl;
  }
  return 0;
}
