#include <bits/stdc++.h>
using namespace std;
long long int a[100010];
int main() {
  int n;
  cin >> n;
  if (n == 1) {
    cout << 1 << endl;
    return 0;
  }
  int ans = 2;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int MAX = 2;
  for (int i = 2; i < n; i++) {
    while (a[i] == a[i - 1] + a[i - 2]) {
      ans++;
      if (ans > MAX) MAX = ans;
      i++;
      if (i == n) {
        cout << MAX << endl;
        return 0;
      }
    }
    ans = 2;
  }
  cout << MAX << endl;
  return 0;
}
