#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  long long n, a[100005], f[100005] = {}, rs = 1;
  cin >> n;
  for (long i = 0; i < n; i++) cin >> a[i];
  int d = 0;
  f[0] = 1, f[1] = 2;
  for (long i = 2; i < n; i++) {
    if (a[i] == a[i - 1] + a[i - 2]) {
      f[i] = f[i - 1] + 1;
    } else {
      f[i] = 2;
    }
  }
  for (long i = 0; i < n; i++) {
    if (f[i] > rs) rs = f[i];
  }
  cout << rs;
  return 0;
}
