#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> P;
typedef pair<int,P> P1;
typedef pair<P,P> P2;
#define pu push
#define pb push_back
#define mp make_pair
#define eps 1e-7
#define INF 1000000000
#define fi first
#define sc second
#define rep(i,x) for(int i=0;i<x;i++)
#define SORT(x) sort(x.begin(),x.end())
#define ERASE(x) x.erase(unique(x.begin(),x.end()),x.end())
#define POSL(x,v) (lower_bound(x.begin(),x.end(),v)-x.begin())
#define POSU(x,v) (upper_bound(x.begin(),x.end(),v)-x.begin())
typedef complex<double> pt;
//typedef pair<pt,pt> L;
typedef vector<P> poly;
const double EPS = 1e-9;
#define x real()
#define y imag()
bool eq(double a,double b){
  return (-EPS < a-b && a-b < EPS);
}
double dot(pt a,pt b){
	return (conj(a)*b).x;
}
double cross(pt a,pt b){
	return (conj(a)*b).y;
}
int ccw(pt a,pt b,pt c){
	b -= a; c -= a;
	if(cross(b,c) > EPS) return 1; // counter clockwise
	if(cross(b,c) < -EPS) return -1; // clockwise
	if(dot(b,c) < -EPS) return 2; //c-a-b
	if(norm(b) < norm(c)) return -2; //a-b-c
	return 0; //a-c-b
}

int n;
vector<pair<pt,pt> >L;
void add(pt c1,double r1,pt c2,double r2){
	//tangent line
	c2-=c1; // later add c1
	//(0,0) and c2
	double IN = norm(c2)-(r1+r2)*(r1+r2);
	if(IN >= 0){
		double c3_x_1 = r1 / norm(c2) * (c2.x * (r1+r2) + c2.y * sqrt(norm(c2)-(r1+r2)*(r1+r2)) );
		double c3_y_1 = r1 / norm(c2) * (c2.y * (r1+r2) - c2.x * sqrt(norm(c2)-(r1+r2)*(r1+r2)) );
		double c3_x_2 = r1 / norm(c2) * (c2.x * (r1+r2) - c2.y * sqrt(norm(c2)-(r1+r2)*(r1+r2)) );
		double c3_y_2 = r1 / norm(c2) * (c2.y * (r1+r2) + c2.x * sqrt(norm(c2)-(r1+r2)*(r1+r2)) );
		pt T2 = pt(c3_x_1,c3_y_1); T2 *= pt(0.0,1.0); L.pb(mp(pt(c3_x_1,c3_y_1)+c1,pt(c3_x_1,c3_y_1)+c1+T2));
		T2 = pt(c3_x_2,c3_y_2); T2 *= pt(0.0,1.0); L.pb(mp(pt(c3_x_2,c3_y_2)+c1,pt(c3_x_2,c3_y_2)+c1+T2));
	}
	IN = norm(c2)-(r1-r2)*(r1-r2);
	if(IN >= 0){
		double c3_x_1 = r1 / norm(c2) * (c2.x * (r1-r2) + c2.y * sqrt(norm(c2)-(r1-r2)*(r1-r2)) );
		double c3_y_1 = r1 / norm(c2) * (c2.y * (r1-r2) - c2.x * sqrt(norm(c2)-(r1-r2)*(r1-r2)) );
		double c3_x_2 = r1 / norm(c2) * (c2.x * (r1-r2) - c2.y * sqrt(norm(c2)-(r1-r2)*(r1-r2)) );
		double c3_y_2 = r1 / norm(c2) * (c2.y * (r1-r2) + c2.x * sqrt(norm(c2)-(r1-r2)*(r1-r2)) );
		pt T2 = pt(c3_x_1,c3_y_1); T2 *= pt(0.0,1.0); L.pb(mp(pt(c3_x_1,c3_y_1)+c1,pt(c3_x_1,c3_y_1)+c1+T2));
		T2 = pt(c3_x_2,c3_y_2); T2 *= pt(0.0,1.0); L.pb(mp(pt(c3_x_2,c3_y_2)+c1,pt(c3_x_2,c3_y_2)+c1+T2));
	}
}
int main(){
	while(1){
		cin >> n ; if(!n) return 0; L.clear();
		vector<pt>A; double r[55],m[55];
		for(int i=0;i<n;i++){
			double xx,yy; scanf("%lf%lf%lf%lf",&xx,&yy,&r[i],&m[i]);
			A.pb(pt(xx,yy));
		}
		for(int i=0;i<n;i++){
			for(int j=i+1;j<n;j++){
				add(A[i],r[i],A[j],r[j]);
				add(A[i],r[i]+m[i],A[j],r[j]);
				add(A[i],r[i],A[j],r[j]+m[j]);
				add(A[i],r[i]+m[i],A[j],r[j]+m[j]);
			}
		}
		int ret = 1;
		for(int i=0;i<L.size();i++){
			int sum = 0;
			for(int j=0;j<n;j++){
				double X = abs(L[i].fi-L[i].sc),Y = abs(L[i].fi-A[j]),Z = abs(L[i].sc-A[j]);
				double s = (X+Y+Z) / 2.0;
				double area = sqrt(s * (s - X) * (s - Y) * (s - Z));
				double h = area / X * 2.0;
				if(r[j]-eps <= h && h <= r[j]+m[j]+eps) sum++;
			}
			ret = max(ret,sum);
		}
		cout << ret << endl;
	}
}

Measured memory_bytes: 4112