#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n == 2 || n == 1) {
    cout << n << endl;
    return 0;
  }
  int count = 2;
  int m = 0;
  for (int i = 2; i < n; i++) {
    if (a[i - 1] + a[i - 2] == a[i]) {
      count++;
    } else {
      count = 2;
    }
    m = max(count, m);
  }
  cout << m;
}
