#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int a[n];
  for (long long int i = 0; i < n; i++) cin >> a[i];
  long long int prepre = 1;
  long long int pre = 2;
  if (n == 1) {
    cout << "1";
    return 0;
  }
  long long int mx = 2;
  for (long long int i = 2; i < n; i++) {
    if (a[i] == a[i - 1] + a[i - 2]) {
      long long int x = pre;
      prepre = pre;
      pre = x + 1;
    } else {
      prepre = pre;
      pre = 2;
    }
    mx = max(pre, mx);
  }
  cout << mx << "\n";
}
