#include <bits/stdc++.h>
using namespace std;
const int N = 111111;
const int INF = int(1e9), mod = (int)1e9 + 7;
int n, a[N], cnt = 2, ans = 2;
int main() {
  cin >> n;
  for (int(i) = (0); (i) < (n); ++(i)) cin >> a[i];
  if (n == 1) {
    cout << 1;
    return 0;
  }
  for (int i = 2; i < n; ++i) {
    a[i] == a[i - 1] + a[i - 2] ? ans = max(++cnt, ans) : cnt = 2;
  }
  cout << ans;
  return 0;
}
