#include <bits/stdc++.h>
using namespace std;
const int maxN = 1000 * 100 + 50;
bool mark[maxN];
int a[maxN];
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  if (n <= 2) {
    cout << n << endl;
    return 0;
  }
  for (int i = 2; i < n; i++)
    if (a[i] == a[i - 1] + a[i - 2]) mark[i] = 1;
  int j = 2;
  while (mark[j] == 0 && j != n) j++;
  if (j == n) {
    cout << 2 << endl;
    return 0;
  } else {
    int ans = 0, cnt = 1;
    for (; j < n; j++) {
      if (mark[j] == 0) {
        ans = max(ans, cnt);
        cnt = 1;
      } else
        cnt++;
    }
    ans = max(ans, cnt);
    cout << ans + 1 << endl;
    return 0;
  }
}
