#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
map<long long int, long long int> m;
pair<int, int> p[10010];
int main() {
  long long int n, k, c = 2, d = 2;
  cin >> n;
  long long int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 2; i < n; i++) {
    if (a[i] == a[i - 1] + a[i - 2]) {
      c = c + 1;
    } else {
      d = max(d, c);
      c = 2;
    }
  }
  d = max(d, c);
  if (n == 1)
    cout << 1;
  else
    cout << d;
}
