#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int arr[1003];
  for (int i = 0; i < n; i++) cin >> arr[i];
  map<int, int> mp;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int sum = arr[i] + arr[j];
      mp[sum]++;
    }
  }
  int ans = 0;
  for (auto u : mp) {
    if (u.second > ans) ans = u.second;
  }
  cout << ans << "\n";
}
