#include <bits/stdc++.h>
using namespace std;
map<string, long long int> month;
void Month() {
  month["January"] = 1, month["February"] = 2, month["March"] = 3,
  month["April"] = 4, month["May"] = 5, month["June"] = 6;
  month["July"] = 7, month["August"] = 8, month["September"] = 9,
  month["October"] = 10, month["November"] = 11, month["December"] = 12;
}
long long int arr[10000000 + 7];
long long int arr2[10000000 + 7];
long long int A[1000];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  vector<long long int> v;
  long long int n, mx = 0;
  cin >> n;
  for (long long int i = 0; i < n; i++) cin >> arr[i];
  for (long long int i = 0; i < n; i++) {
    for (long long int j = i + 1; j < n; j++) {
      v.push_back(arr[i] + arr[j]);
      long long int val = arr[i] + arr[j];
      arr2[val]++;
      if ((arr2[val]) > mx) mx = arr2[val];
    }
  }
  cout << mx << endl;
  return 0;
}
