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