#include <bits/stdc++.h>
using namespace std;
int a[1010], vis[200010];
int main() {
  int n, ans = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i < n; i++)
    for (int j = i + 1; j <= n; j++) {
      vis[a[i] + a[j]]++;
      ans = max(vis[a[i] + a[j]], ans);
    }
  cout << ans << endl;
  return 0;
}
