#include <bits/stdc++.h>
using namespace std;
const long long int N = 2e5 + 5;
void solve() {
  long long int n, i, j, ans = 0;
  cin >> n;
  long long int a[n];
  for (auto &x : a) {
    cin >> x;
  };
  map<long long int, long long int> cnt;
  for (i = 0; i < n; i++) {
    for (j = i + 1; j < n; j++) {
      cnt[a[i] + a[j]]++;
      ans = max(ans, cnt[a[i] + a[j]]);
    }
  }
  cout << ans << '\n';
}
signed main() {
  ios_base::sync_with_stdio(0), cin.tie(NULL), cout.tie(NULL);
  long long int t = 1;
  while (t--) {
    solve();
  }
}
