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