#include <bits/stdc++.h>
using namespace std;
const int N = 1000, nn = 2e5 + 5;
;
int a[N], f[nn] = {};
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  long long n;
  cin >> n;
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
  }
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      f[a[i] + a[j]]++;
    }
  }
  int mx = 0;
  for (int i = 0; i < nn; ++i) {
    mx = max(mx, f[i]);
  }
  cout << mx;
  return 0;
}
