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