#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, first[100010];
  bool second[100010] = {0};
  cin >> n;
  if (n == 1) {
    cout << 1;
    return 0;
  }
  if (n == 2) {
    cout << 2;
    return 0;
  }
  for (int i = 0; i < n; i++) cin >> first[i];
  for (int i = 2; i < n; i++)
    if (first[i] == first[i - 1] + first[i - 2]) second[i] = 1;
  int l = 0, ans = 0;
  for (int i = 2; i < n; i++) {
    if (second[i] == 1)
      l++;
    else {
      ans = max(ans, l);
      l = 0;
    }
  }
  ans = max(ans, l);
  cout << ans + 2;
}
