#include <bits/stdc++.h>
using namespace std;
vector<long long> v;
int32_t main() {
  long long n, cnt = 2, ans = 0, a[100005];
  cin >> n;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 2; i < n; i++) {
    if (a[i] == a[i - 1] + a[i - 2])
      cnt++;
    else {
      ans = max(ans, cnt);
      cnt = 2;
    }
  }
  ans = max(ans, cnt);
  cout << min(ans, n);
}
