#include <bits/stdc++.h>
using namespace std;
int n;
int a[1005];
int s[1000005] = {0};
int ans = 0;
void check() {
  for (int i = 1; i < n; i++) {
    for (int j = i + 1; j <= n; j++) {
      s[a[i] + a[j]]++;
    }
  }
  for (int i = 1; i <= 1000000; i++) {
    ans = max(ans, s[i]);
  }
  cout << ans << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  check();
  return 0;
}
