#include <bits/stdc++.h>
#pragma optimization_level 3
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx")
using namespace std;
const long long MOD = 1e+9 + 7;
const long long INF = LLONG_MAX;
const int INFi = INT_MAX;
const long long N = 3e+6 + 8;
const long double PI = 3.1415926535897932384626433832795;
long long tc = 1;
long long a[N];
void solve(long long tc) {
  long long n, ans;
  cin >> n;
  for (long long i = (1); i <= n; i++) cin >> a[i];
  ;
  if (n == 1)
    ans = 1;
  else
    ans = 2;
  long long count = 2;
  for (long long i = (3); i <= n; i++) {
    if (a[i] == a[i - 1] + a[i - 2]) {
      count++;
    } else
      count = 2;
    ans = max(ans, count);
  }
  cout << ans << endl;
  ;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed;
  cout << setprecision(10);
  ;
  for (long long i = (1); i <= tc; i++) {
    solve(i);
  }
  return 0;
}
