#include <bits/stdc++.h>
using namespace std;
int MOD = 1000000007;
const long long INF = 1e18;
const int MX = 200005;
long long gcd(long long a, long long b) { return (b == 0) ? a : gcd(b, a % b); }
long long binpow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a;
    a = a * a;
    b >>= 1;
  }
  return res;
}
long long powmod(long long a, long long b, long long m) {
  a %= m;
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = res * a % m;
    a = a * a % m;
    b >>= 1;
  }
  return res;
}
long long modinv(long long n, long long p) { return powmod(n, MOD - 2, MOD); }
void max_self(long long &a, long long b) { a = max(a, b); }
long long getAdd(long long x) {
  long long m1 = 10, m2 = 0;
  while (x > 0) {
    long long y = x % 10;
    x /= 10;
    m1 = min(m1, y);
    m2 = max(m2, y);
  }
  return m1 * m2;
}
int main(int argc, char const *argv[]) {
  cin.tie(0);
  int n, a[MX];
  cin >> n;
  map<int, int> make_pair;
  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) ++make_pair[a[i] + a[j]];
  int mx = 0;
  for (auto x : make_pair) {
    mx = max(mx, x.second);
  }
  cout << mx;
  return 0;
}
