#include <bits/stdc++.h>
using namespace std;
void Q_Q() {
  ios::sync_with_stdio(0);
  ios_base::sync_with_stdio(0);
  cin.tie(0), cout.tie(0);
}
int main() {
  Q_Q();
  int n;
  cin >> n;
  int arr[n];
  long long int c = 2;
  long long int ans = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
  }
  if (n == 1) {
    cout << 1;
    return 0;
  } else if (n == 2) {
    cout << 2;
    return 0;
  }
  for (int i = 2; i < n; i++) {
    if (arr[i] == arr[i - 1] + arr[i - 2]) {
      c++;
    } else {
      ans = max(ans, c);
      c = 2;
    }
  }
  ans = max(ans, c);
  cout << ans;
  return 0;
}
