#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void ckmin(T &a, T b) {
  if (b < a) a = b;
}
template <class T>
inline void ckmax(T &a, T b) {
  if (b > a) a = b;
}
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int n;
  cin >> n;
  std::vector<int> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i];
  unordered_map<int, int> um;
  for (int i = 0; i < n - 1; ++i) {
    for (int j = i + 1; j < n; ++j) um[a[i] + a[j]]++;
  }
  int ans = -1;
  for (auto i : um) ckmax(ans, i.second);
  cout << ans << endl;
  return 0;
}
