#include <bits/stdc++.h>
using namespace std;
const int maxn = 45;
int a[maxn];
int d[100000 + 10];
int main() {
  int n, i;
  a[1] = a[2] = 1;
  for (i = 3; i < maxn; ++i) a[i] = a[i - 1] + a[i - 2];
  while (cin >> n) {
    for (i = 1; i <= n; ++i) cin >> d[i];
    if (n == 1) {
      cout << "1" << endl;
      continue;
    }
    int Max = 2;
    int cnt = 2;
    for (i = 3; i <= n; ++i) {
      if (d[i] == d[i - 1] + d[i - 2])
        cnt++;
      else {
        if (cnt > Max) Max = cnt;
        cnt = 2;
      }
    }
    if (Max < cnt) Max = cnt;
    cout << Max << endl;
  }
  return 0;
}
