#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[100010], dp, ans;
  cin >> n;
  for (int i = 0; i < n; ++i) cin >> a[i];
  ans = dp = min(2, n);
  for (int i = 2; i < n; ++i) {
    if (a[i] == a[i - 1] + a[i - 2])
      dp++;
    else
      dp = 2;
    ans = max(dp, ans);
  }
  cout << ans << endl;
  return 0;
}
