#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void IO(T &x) {
  char c = getchar();
  T sgn = 1;
  while (c < '0' || c > '9') {
    if (c == '-') sgn = -1;
    c = getchar();
  }
  x = 0;
  while (c >= '0' && c <= '9') {
    x = (T)(x << 1) + (x << 3) + c - '0';
    c = getchar();
  }
  x *= sgn;
}
template <class T>
T POW(T b, T push) {
  T res = 1;
  while (push > 0) {
    if (push & 1) res *= b;
    push >>= (1ll), b *= b;
  }
  return res;
}
template <class T>
T bMOD(T a, T push, T m) {
  if (push == 0) return (T)1;
  if (!(push & 1)) {
    T temp = bMOD(a, push / 2, m);
    return ((temp % m) * (temp % m)) % m;
  }
  return ((a % m) * (bMOD(a, push - 1, m) % m)) % m;
}
template <class T>
T inMOD(T a, T m) {
  return bMOD(a, m - 2, m);
}
template <class T>
bool isPrime(T n) {
  for (T i = 2; i * i <= n; i++) {
    if (n % i == 0) return false;
  }
  return true;
}
template <class T>
string toString(T n) {
  stringstream second;
  string num;
  second << n;
  second >> num;
  return num;
}
template <class T>
T sq(T n) {
  return (n * n);
}
template <class T>
T gcd(T a, T b) {
  return (b == 0) ? a : gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return (a / gcd(a, b)) * b;
}
bool iseq(double a, double b) { return fabs(a - b) < 1e-9; }
template <class T>
T toDeg(T x) {
  return (180.0 * x) / ((T)acos(-1.0));
}
template <class T>
T toReg(T x) {
  return (x * (T)acos(-1.0)) / (180.0);
}
template <class T>
double _distance(T x1, T y1, T x2, T y2) {
  return 1.0 * sqrt(sq(x1 - x2) + sq(y1 - y2));
}
int kx[] = {-2, -2, +2, +2, +1, -1, +1, -1};
int ky[] = {+1, -1, +1, -1, -2, -2, +2, +2};
int dx[] = {+0, +0, -1, +1, +1, +1, -1, -1};
int dy[] = {+1, -1, +0, +0, -1, +1, +1, -1};
int x[] = {+0, +0, +1, -1};
int y[] = {+1, -1, +0, +0};
map<int, int> cnt;
int main() {
  int n;
  cin >> n;
  int a[1010];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  int mx = 1;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      cnt[a[i] + a[j]]++;
      mx = max(cnt[a[i] + a[j]], mx);
    }
  }
  cout << mx << '\n';
  return 0;
}
