#include <bits/stdc++.h>
namespace patch {
template <typename T>
std::string to_string(const T& n) {
  std::ostringstream stm;
  stm << n;
  return stm.str();
}
}  // namespace patch
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  long long int N, arr[100050];
  cin >> N;
  for (int i = 0; i < N; cin >> arr[i++])
    ;
  long long int res = 0, ans = 0;
  res = min(N, 2ll);
  ans = min(N, 2ll);
  for (int i = 2; i < N; i++) {
    if (arr[i] == arr[i - 1] + arr[i - 2]) {
      res++;
    } else {
      ans = max(res, ans);
      res = 2;
    }
  }
  ans = max(res, ans);
  res = 0;
  cout << ans;
  return 0;
}
