#include <bits/stdc++.h>
using namespace std;
int sum[200050];
int main() {
  {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
  };
  int n;
  cin >> n;
  vector<int> sweets(n);
  for (int i = 0; i < n; i++) cin >> sweets[i];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i != j) sum[sweets[i] + sweets[j]]++;
    }
  }
  int max = -1;
  int maxS = -1;
  for (int i = 0; i < 200050; i++) {
    if (sum[i] > max) {
      max = sum[i];
      maxS = i;
    }
  }
  max /= 2;
  cout << max << '\n';
  return 0;
}
