#include <bits/stdc++.h>
using namespace std;
ifstream f("fib.in");
ofstream g("fib.out");
int i, n, a[100005], b[100005], sol;
int main() {
  cin >> n;
  for (i = 1; i <= n; i++) cin >> a[i];
  b[1] = 1;
  b[2] = 2;
  for (i = 3; i <= n; i++)
    if (a[i] == a[i - 1] + a[i - 2])
      b[i] = b[i - 1] + 1;
    else
      b[i] = 2;
  for (i = 1; i <= n; i++) sol = max(sol, b[i]);
  cout << sol;
  return 0;
}
