#include <bits/stdc++.h>
using namespace std;
long long int max(long long int a, long long int b) {
  if (a > b)
    return a;
  else
    return b;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int n, a, i;
  cin >> n;
  vector<long long int> v;
  for (i = 0; i < n; i++) {
    cin >> a;
    v.push_back(a);
  }
  if (n == 1) {
    cout << "1";
    return 0;
  }
  long long int ans = 2, count = 2;
  for (i = n - 1; i >= 2; i--) {
    long long int q, w;
    q = v[i - 1] + v[i - 2];
    if (v[i] == q) {
      count = count + 1;
      ans = max(ans, count);
    } else {
      count = 2;
    }
  }
  cout << ans;
}
