#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>

using namespace std;

int main()
{
    int n;
    cin >> n;

    vector < pair < long long, long long > > koordinate(n, make_pair(0, 0));
    for (int i = 0; i < n; ++i)
        cin >> koordinate[i].first >> koordinate[i].second;

    sort(koordinate.begin(), koordinate.end());

    long long resenje(0);
    for (int i = 0; i < n-1; ++i)
        if (koordinate[i].first == koordinate[i+1].first) resenje++;

    vector < double > koeficijenti(n*(n-1)/2 - resenje, 0);

    if (resenje > 0) resenje--;

    long long k(0);
    for (int i = 0; i < n-1; ++i)
        for (int j = i+1; j < n; ++j)
        {
        if (koordinate[i].first != koordinate[j].first)
            koeficijenti[k++] = (static_cast<double>(koordinate[i].second)-static_cast<double>(koordinate[j].second))
                                 /(static_cast<double>(koordinate[i].first)-static_cast<double>(koordinate[j].first));
        }

    sort(koeficijenti.begin(), koeficijenti.end());

    for (int i = 0; i < k-1; ++i)
    {
        if (koeficijenti[i] == koeficijenti[i+1]) resenje++;
    }

    cout << resenje;
    return 0;
}