#include <bits/stdc++.h>
using namespace std;
const int maxn = 10001;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  if (n == 1 || n == 2) {
    cout << n;
    return 0;
  }
  int mx = 2, ans = 2;
  for (int i = 2; i < n; i++) {
    if (a[i] == a[i - 1] + a[i - 2]) {
      ans++;
      mx = max(mx, ans);
    } else {
      mx = max(mx, ans);
      ans = 2;
    }
  }
  mx = max(ans, mx);
  cout << mx;
  return 0;
}
