#include <bits/stdc++.h>
using namespace std;
int fib[101010], a[101010];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  memset(fib, 0, sizeof(fib));
  for (int i = 3; i <= n; i++)
    if (a[i] == a[i - 1] + a[i - 2]) fib[i] = 1;
  int ans = min(n, 2);
  int res = 2;
  for (int i = 3; i <= n; i++) {
    if (fib[i])
      res += fib[i];
    else
      res = 2;
    ans = max(ans, res);
  }
  printf("%d\n", ans);
  return 0;
}
