#include <bits/stdc++.h>
using namespace std;
int A[10000], C[500000] = {0};
int Max = 0;
int main(void) {
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    scanf("%d", &A[i]);
  }
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int x = A[i] + A[j];
      C[x]++;
      if (x > Max) Max = x;
    }
  }
  int ans = 0;
  for (int i = 2; i <= Max; i++) {
    if (C[i] > ans) ans = C[i];
  }
  printf("%d", ans);
}
