#include <bits/stdc++.h>
#pragma G++ optimize("Ofast")
#pragma G++ optimize("avx")
using namespace std;
void solve() {
  long long n;
  cin >> n;
  long long a[n];
  unordered_map<long long, long long> freq;
  for (long long i = 0; i < n; i++) cin >> a[i];
  for (long long i = 0; i < n; i++) {
    for (long long j = i + 1; j < n; j++) {
      freq[a[i] + a[j]]++;
    }
  }
  long long mx = 0;
  for (auto x : freq) {
    mx = max(mx, x.second);
  }
  cout << mx << "\n";
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  long long t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
