#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int arr[100000];
  for (int i = 0; i < n; i++) cin >> arr[i];
  int sum = 0;
  unordered_map<int, int> mymap;
  for (int i = 0; i < n; i++) {
    for (int j = i + 1; j < n; j++) {
      int x = arr[i] + arr[j];
      mymap[x]++;
    }
  }
  for (auto const& x : mymap) {
    sum = max(sum, x.second);
  }
  cout << sum;
}
