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