#include <bits/stdc++.h>
using namespace std;
int a, s, d[100002], f, g, h, j, k, l = 2, i, n, m;
int main() {
  cin >> n;
  if (n == 1) {
    cout << 1;
    return 0;
  } else
    cin >> d[0] >> d[1];
  k = 2;
  for (i = 2; i < n; i++) {
    cin >> d[i];
    if (d[i] == d[i - 1] + d[i - 2])
      k++;
    else {
      l = max(k, l);
      k = 2;
    }
  }
  cout << max(l, k);
}
