#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int dp[200000];
  int a[200000];
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    dp[i] = 0;
  }
  dp[0] = 1;
  if (n >= 2) dp[1] = 2;
  for (int i = 2; i < n; i++)
    if (a[i] == a[i - 1] + a[i - 2])
      dp[i] = dp[i - 1] + 1;
    else
      dp[i] = 2;
  int maxval = 0;
  for (int i = 0; i < n; i++)
    if (dp[i] > maxval) maxval = dp[i];
  printf("%d\n", maxval);
  return 0;
}
