#include <bits/stdc++.h>
#pragma GCC optimize("-O2")
using namespace std;
const int LIM = 2e5 + 5, MOD = 1e9 + 7;
int t, n, m, k, x, y;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int A[n];
  for (int i = 0; i < n; i++) cin >> A[i];
  int Count[200000];
  for (int i = 0; i < 200000; i++) Count[i] = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int k = A[i] + A[j];
      Count[k]++;
    }
  }
  int maxv = 0;
  for (int i = 0; i < 200000; i++) {
    maxv = max(maxv, Count[i]);
  }
  cout << maxv << endl;
}
