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