#include <bits/stdc++.h>
using namespace std;
const int maxn = 1005;
int lizak[maxn];
int ile[200005];
int main() {
  ios_base::sync_with_stdio(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> lizak[i];
  }
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      ile[lizak[i] + lizak[j]]++;
    }
  }
  int wyn = 0;
  for (int i = 1; i < 200005; i++) wyn = max(wyn, ile[i] / 2);
  cout << wyn << "\n";
  return 0;
}
