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