#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << 1;
    return 0;
  }
  int nums[n];
  for (int i = 0; i < n; i++) {
    cin >> nums[i];
  }
  bool canSum[n];
  memset(canSum, false, sizeof(canSum));
  int connected = 2;
  int maxConnect = 2;
  for (int i = 2; i < n; i++) {
    if (nums[i] == nums[i - 1] + nums[i - 2]) {
      canSum[i] = true;
      connected++;
      if (connected > maxConnect) {
        maxConnect = connected;
      }
    } else {
      connected = 2;
    }
  }
  cout << maxConnect;
}
