#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 1e5 + 5;
ll f[N];
int n, ans, c;
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) scanf("%lld", &f[i]);
  for (int i = 2; i < n; i++) {
    if (f[i] == f[i - 1] + f[i - 2]) {
      c++;
      ans = max(ans, c + 2);
    } else {
      c = 0;
    }
  }
  printf("%d\n", (ans == 0 || ans == 1) ? (n == 1 ? 1 : 2) : ans);
  return 0;
}
