#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 111, K = 17;
const int mod = 1e9 + 7, P1 = 29;
int freq[N];
int main() {
  int n;
  cin >> n;
  vector<int> arr(n);
  for (int i = 0; i < n; i++) scanf("%d", &arr[i]);
  sort(arr.begin(), arr.end());
  int mx = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      freq[arr[i] + arr[j]]++;
      mx = max(mx, freq[arr[i] + arr[j]]);
    }
  }
  cout << mx / 2;
  return 0;
}
