#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const ll mod = 1e9 + 7;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  ;
  int n;
  cin >> n;
  ll a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  vector<int> sums(1e6, 0);
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      sums[a[i] + a[j]] += 1;
    }
  }
  int maxnum = 0;
  for (int i = 0; i < 1e6; i++) {
    maxnum = max(maxnum, sums[i]);
  }
  cout << maxnum << endl;
}
