#include <bits/stdc++.h>
using namespace std;
long i, j, k, n, ln, fg, a[120000], mx, sm;
int main() {
  while (~scanf("%ld", &n)) {
    for (i = 0; i < n; i++) scanf("%ld", &a[i]);
    sm = mx = 2;
    for (i = 2; i < n; i++) {
      if (a[i] == (a[i - 1] + a[i - 2]))
        sm++;
      else {
        if (mx < sm) mx = sm;
        sm = 2;
      }
    }
    if (mx < sm) mx = sm;
    if (n == 1) mx = 1;
    printf("%ld\n", mx);
  }
  return 0;
}
