#include <bits/stdc++.h>
using namespace std;
const long long M = 2 * (1e6 + 2), N = (1e3 + 20), MOD = 1e9 + 7, INF = 1e16;
long long m, x, n, y, k, e, w = INF, c[N], ok, ans, vis[N], a[N], b[M];
vector<pair<long long, long long> > v;
pair<long long, long long> p[M];
string s;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ;
  cin >> n;
  int k = 0;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      p[k++] = {a[i], a[j]};
    }
  }
  long long w = 0;
  for (int i = 0; i < k; i++) {
    b[(p[i].first + p[i].second)]++;
  }
  for (int i = 0; i < M; i++) w = max(w, b[i]);
  cout << w;
  return 0;
}
