#include <bits/stdc++.h>
int main() {
  int n, i;
  scanf("%d", &n);
  long long int a0, a1;
  scanf("%lld %lld", &a0, &a1);
  long long int best = 2;
  long long int now = 2;
  for (i = 2; i < n; i++) {
    long long int x;
    scanf("%lld", &x);
    if (a0 + a1 != x) {
      if (now > best) {
        if (now > best) best = now;
      }
      now = 2;
    } else
      now++;
    a0 = a1;
    a1 = x;
    if (now > best) best = now;
  }
  if (n < best) best = n;
  printf("%lld\n", best);
  return 0;
}
