#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  vector<long long> a(n);
  for (long long i = 0; i < n; i++) {
    cin >> a[i];
  }
  int b[1000000];
  for (int i = 0; i < 1000000; i++) b[i] = 0;
  for (int i = 0; i < n - 1; i++) {
    for (int j = i + 1; j < n; j++) {
      int temp;
      temp = a[i] + a[j];
      b[temp]++;
    }
  }
  int mx = INT_MIN;
  for (int i = 0; i < 1000000; i++) {
    mx = max(mx, b[i]);
  }
  cout << mx << endl;
  return 0;
}
