#include <stdio.h>
#include <cmath>
#include <algorithm>
#include <cfloat>
#include <stack>
#include <queue>
#include <vector>
#include <string>
#include <iostream>
#include <set>
#include <map>
#include <time.h>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


struct Info{
	double r,sx,sy,tx,ty;
};

struct Point{
	void set(double arg_x,double arg_y){
		x = arg_x;
		y = arg_y;
	}
	double x,y;
};

typedef Point Vector;

struct Segment{
	void set(double x1,double y1,double x2,double y2){
		p1.x = x1;
		p1.y = y1;
		p2.x = x2;
		p2.y = y2;
	}
	Point p1,p2;
};

typedef Segment Line;

double cross(Vector a,Vector b){
	return a.x*b.y-a.y*b.x;
}

double dot(Vector a,Vector b){
	return a.x*b.x + a.y*b.y;
}

Point calc_minus(Point a,Point b){
	Point ret;

	ret.x = a.x-b.x;
	ret.y = a.y-b.y;

	return ret;
}

double calc_len(Vector a){
	return sqrt(a.x*a.x+a.y*a.y);
}

double getDistanceLP(Line l,Point p){
	return fabs(cross(calc_minus(l.p2,l.p1),calc_minus(p,l.p1))/calc_len(calc_minus(l.p2,l.p1)));
}

double getDistanceSP(Segment s,Point p){
	if(dot(calc_minus(s.p2,s.p1),calc_minus(p,s.p1)) < 0.0)return calc_len(calc_minus(p,s.p1));
	if(dot(calc_minus(s.p1,s.p2),calc_minus(p,s.p2)) < 0.0)return calc_len(calc_minus(p,s.p2));
	return getDistanceLP(s,p);
}

bool dp[65536];

int main(){

	int POW[17];
	for(int i = 0; i < 17; i++)POW[i] = pow(2,i);

	int N;
	scanf("%d",&N);
	Info info[N];

	for(int i = 0; i < N; i++){
		scanf("%lf %lf %lf %lf %lf",&info[i].r,&info[i].sx,&info[i].sy,&info[i].tx,&info[i].ty);
	}

	for(int state = 0; state < POW[N]; state++)dp[state] = false;
	dp[0] = true;

	int ans = 0,tmp_num;
	bool is_init_pos[N];
	Segment move_line;
	Point point;

	bool FLG;

	for(int state = 0; state < POW[N]; state++){
		if(!dp[state])continue;
		tmp_num = 0;

		for(int loop = 0; loop < N; loop++){
			if(state & (1 << loop)){
				is_init_pos[loop] = false;
				tmp_num++;
			}else{
				is_init_pos[loop] = true;
			}
		}
		ans = max(ans,tmp_num);

		for(int i = 0; i < N; i++){
			if(is_init_pos[i] == false || dp[state+POW[i]] == true)continue;

			move_line.set(info[i].sx,info[i].sy,info[i].tx,info[i].ty);
			FLG = true;

			for(int k = 0; k < N; k++){
				if(i == k)continue;

				if(is_init_pos[k]){
					point.set(info[k].sx,info[k].sy);
				}else{
					point.set(info[k].tx,info[k].ty);
				}

				if(getDistanceSP(move_line,point) < info[i].r+info[k].r){
					FLG = false;
					break;
				}
			}

			if(FLG){
				dp[state+POW[i]] = true;
			}
		}
	}

	printf("%d\n",ans);

	return 0;
}