#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<long long int> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  if (n == 1) {
    cout << 1;
  } else if (n == 2) {
    cout << 2;
  } else {
    long long int len = 2;
    long long int mx = 2;
    int l = 0, r = 2;
    while (r != n) {
      if (a[l] + a[l + 1] == a[r]) {
        len++;
        l++;
        r++;
        mx = max(len, mx);
      } else {
        len = 2;
        l++;
        r++;
      }
    }
    cout << mx;
  }
}
