#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int a[n], i, y = 0, j;
  for (i = 0; i < n; i++) scanf("%d", &a[i]);
  int b[200009] = {0};
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      b[a[i] + a[j]]++;
      y = max(y, b[a[i] + a[j]]);
    }
  }
  printf("%d", y);
  return 0;
}
