#include <bits/stdc++.h>
using namespace std;
int freq[200005];
int arr[1005];
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  for (int i = 1; i <= n; i++)
    for (int j = i + 1; j <= n; j++) freq[arr[i] + arr[j]]++;
  int ans = 0;
  for (int i = 0; i < 2e5 + 5; i++) ans = max(ans, freq[i]);
  cout << ans;
  return 0;
}
