#include <bits/stdc++.h>
#define fi first
#define se second
#define mp make_pair
#define pb push_back
using namespace std;

typedef long long ll;
typedef pair<int,int> pi;
int main()
{
	cin.tie(0);cout.tie(0);
	int sx,sy,gx,gy;
	cin>>sx>>sy>>gx>>gy;
	cout<<fixed<<setprecision(8);
	if(sx>gx) 
	{
		swap(sx,gx);
		swap(sy,gy);
	} 
	double k=(gx-sx)*1.0/(sy+gy);
	k*=sy;
	cout<<k+sx<<endl;
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); i++)
using ll = long long;
 
int main(){
  int n;
  cin >> n;
  vector<int> x(n), y(n);
  rep(i,n) cin >> x[i] >> y[i];
  int ans = 0;
  rep(i,n)rep(j,n){
    double ka;
    ka = (double)(y[j] - y[i]) / (x[j] - x[i]);
    if (ka >= -1 && ka <= 1){
      ans++;
    }
  }
  cout << ans/2 << endl;
  return 0;
}