#include <bits/stdc++.h>
using namespace std;
const int N = 200005, M = 1e5 + 5, OO = 0x3f3f3f3f;
int A[N], B[7] = {0, 1, 2, 3, 4};
map<string, string> m, m2;
int main() {
  int l = 0, n, a, l2 = 0, c = 2, t = 2, b;
  cin >> n;
  if (n == 1 || n == 2) {
    cout << n;
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    cin >> a;
    if (i >= 2) {
      if (l + l2 == a)
        c++;
      else
        c = 2;
    }
    l2 = l;
    l = a;
    t = max(t, c);
  }
  cout << t;
  return 0;
}
