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