#include <bits/stdc++.h>
int main() {
  int n, i, a[100001], ans = 1, temp = 1;
  scanf("%d", &n);
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  if (n >= 2) ans = 2, temp = 2;
  for (i = 2; i < n; i++) {
    if (a[i] == a[i - 1] + a[i - 2]) {
      temp++;
    } else {
      if (ans < temp) ans = temp;
      temp = 2;
    }
  }
  if (ans < temp) ans = temp;
  printf("%d\n", ans);
}
