#include<iostream>
#include<complex>
#include<cmath>

#define FRONT 0x01
#define RIGHT 0x02
#define BACK 0x04
#define LEFT 0x08
#define OVER 0x10

#define CIRCLE_SAME 0x01
#define CIRCLE_CONTAIN 0x02
#define CIRCLE_NO_CROSS 0x04
#define CIRCLE_ONE_CROSS 0x08
#define CIRCLE_ONE_INSIDE_CROSS 0x10
#define CIRCLE_TWO_CROSS 0x20

#define sc second
#define fr first

using namespace std;

typedef double elem;
typedef complex<elem> point, vec;
typedef pair<point, point> line, seg, pp;

const double eps = 1.0e-8;
const double pi = acos(-1.0);
point base(0,0);

elem sq(elem a){ return a*a; }
bool eq(elem a, elem b){ return abs(a-b) < eps; }
bool lt(elem a, elem b){ return !eq(a,b) && a < b; }
bool leq(elem a, elem b){ return eq(a,b) || a < b; }
bool gt(elem a, elem b){ return !eq(a,b) && a > b; }
bool geq(elem a, elem b){ return eq(a,b) || a > b; }
bool ltz(elem a){ return lt( a, 0 ); }
bool gtz(elem a){ return gt( a, 0 ); }
bool eqv(vec a, vec b){ return eq( abs(b-a),0); }
bool is_zv(vec v){ return eq(abs(v),0); }
elem emax(elem a, elem b){ return gt(a,b)?a:b; }
elem emin(elem a, elem b){ return lt(a,b)?a:b; }
bool far(point a, point b){ return gtz( abs(b-a) ); }
bool near(point a, point b){ return leq( abs(b-a), 0 ); }
elem dot(vec a, vec b){ return (a.real() * b.real() + a.imag() * b.imag() ); }
elem cross(vec a, vec b){ return ( a.real() * b.imag() - a.imag() * b.real() ); }
elem varg(vec a, vec b){
  elem ret=arg(a)-arg(b);
  if(lt(ret,0))ret+=2*pi;
  if(gt(ret,2*pi))ret-=2*pi;
  if(eq(ret,2*pi))ret=0;
  return ret;
}
point rot(point p, elem theta){ return p * polar((elem)1.0, theta); }
elem dist_l(line l, point x){ return abs(cross(l.sc-l.fr,x-l.fr)) / abs(l.sc-l.fr); }
vec uvec(vec a){ return a / abs(a); }
vec nmr(vec a){ return a * vec(0,-1); }
vec nml(vec a){ return a * vec(0,1); }
vec unmr(vec a){ return uvec( nmr(a) ); }
vec unml(vec a){ return uvec( nml(a) ); }

// CCW ツδ債バツスツトツつセツつェツ、ツ青クツ度ツづ可づヲツづゥ
int ccw(point a, point b, point x){
  b -= a;
  x -= a;
  // if( is_zv(b) || is_zv( x ) ) return ERROR;
  if( gtz( cross(b,x) ) ) return LEFT;
  if( ltz( cross(b,x) ) ) return RIGHT;
  if( ltz( dot(b,x) ) ) return BACK;
  if( abs(b) < abs(x) ) return FRONT;
  return OVER;
}

struct circle{
  point c;
  elem r;
  circle():c(point(0,0)),r(0){}
  circle(point c, elem r):c(c),r(r){}
  bool incircle(point t){
    return leq( abs(t-c), r);
  }
};

int circles_relation(circle c1, circle c2){
  elem d=abs(c1.c-c2.c);
  elem r1=c1.r;
  elem r2=c2.r;
  if(lt(r1,r2))swap(r1,r2);
  if(eq(d,r1+r2))return CIRCLE_ONE_CROSS;
  if(eq(d,r1-r2))return CIRCLE_ONE_INSIDE_CROSS;
  if(gt(d,r1+r2))return CIRCLE_NO_CROSS;
  if(lt(d,r1-r2))return CIRCLE_CONTAIN;
  if(lt(d,r1+r2))return CIRCLE_TWO_CROSS;
  if(near(c1.c,c2.c)&&eq(c1.r,c2.r))return CIRCLE_SAME;
}

int intersection_circles(circle c1, circle c2, pp &p)
{
  if( !( circles_relation( c1, c2 ) & (CIRCLE_ONE_INSIDE_CROSS | CIRCLE_ONE_CROSS | CIRCLE_TWO_CROSS) ) )
    return 0;

  elem d = abs(c1.c-c2.c);
  vec ab = c2.c - c1.c;
  elem k = ( sq( c1.r ) - sq( c2.r ) + sq( d ) ) / ( 2 * sq( d ) );
  point t = k * ab + c1.c;
  elem x = sqrt( sq(c1.r) - sq( d * k ) );
  
  if( eq( x, 0 ) ){
    p.first = t; return 1;
  }else{
    vec abr = unmr( ab ); vec abl = unml( ab );
    vec vp1 = x * abr; vec vp2 = x * abl;
    p.first = vp1 + t; p.second = vp2 + t;
    if(ccw(c1.c,c2.c,p.second)==LEFT)swap(p.first,p.second);
    return 2;
  }
}

int circles_tangential( circle c1, circle c2, line ret[] ){
  pair<point,point> pcross,pcross2;
  elem r1 = c1.r;
  elem r2 = c2.r;
  elem D = abs(c2.c-c1.c);

  int rel = circles_relation( c1, c2 );
  intersection_circles(c1,c2,pcross);
  if( rel & ( CIRCLE_SAME | CIRCLE_CONTAIN ) ) return 0;
  if( rel & ( CIRCLE_ONE_INSIDE_CROSS | CIRCLE_ONE_CROSS ) ){
    point p=pcross.first;
    vec v = p-c1.c;
    ret[0] = line(p,p+unmr(v));
  }
  if( rel == CIRCLE_ONE_INSIDE_CROSS ) return 1;
  if( rel == CIRCLE_ONE_CROSS ) ret[2] = ret[0];

  //external
  elem rEx1 = pow( pow(D,2.0) - pow((r2-r1),2.0) + pow(r1,2.0), 0.5);
  elem rEx2 = pow( pow(D,2.0) - pow((r2-r1),2.0) + pow(r2,2.0), 0.5);
  intersection_circles( circle(c1.c, rEx1), c2, pcross );
  intersection_circles( circle(c2.c, rEx2), c1, pcross2 );
  ret[0] = line(pcross2.second,pcross.first);
  ret[1] = line(pcross2.first,pcross.second);
  if( rel == CIRCLE_ONE_CROSS ) return 3;
  if( rel == CIRCLE_TWO_CROSS ) return 2;

  //internal
  point In((r2*c1.c+r1*c2.c)/(r1+r2));
  elem rIn = pow( pow(abs(c1.c-In),2.0)-(r1*r1), 0.5 );
  intersection_circles( circle(In,rIn), c1, pcross );
  ret[2] = line(In,pcross.first);
  ret[3] = line(In,pcross.second);

  return 4;
}

int circles_tangential2( circle c1, circle c2, line ret[] ){
  pair<point,point> pcross;
  elem r1 = c1.r;
  elem r2 = c2.r;
  elem D = abs(c2.c-c1.c);

  int rel = circles_relation( c1, c2 );
  intersection_circles(c1,c2,pcross);
  if( rel & ( CIRCLE_SAME | CIRCLE_CONTAIN ) ) return 0;
  if( rel & ( CIRCLE_ONE_INSIDE_CROSS ) ){
    point p=pcross.first;
    vec v = p-c1.c;
    ret[0] = line(p,p+unmr(v));
    return 1;
  }
  
  elem theta0 = varg(c2.c-c1.c,vec(1,0));
  point S2(D*(r1/(r1+r2)),0);
  elem theta1 = asin( (r2-r1)/D );
  elem theta2 = asin( (r1+r2)/D );
  point S1_1(rot(point(0,r1),theta1));
  point S1_2(rot(point(0,r1),-theta1-pi));
  vec u(1,0);
  S1_1 = rot(S1_1,theta0) + c1.c;
  S1_2 = rot(S1_2,theta0) + c1.c;
  S2 = rot(S2,theta0) + c1.c;
  // external
  ret[0] = line(S1_1, S1_1 + rot(u,theta0+theta1) );
  ret[1] = line(S1_2, S1_2 + rot(u,theta0-theta1) );
  if( rel == CIRCLE_TWO_CROSS ) return 2;
  // internal
  ret[2] = line(S2, S2 + rot(u,theta0+theta2) );
  if( rel == CIRCLE_ONE_CROSS ) return 3;
  ret[3] = line(S2, S2 + rot(u,theta0-theta2) );
  return 4;
}

int main(){
  /*
  int num;
  line test[4];
  num = circles_tangential( circle(point(1,1),1), circle(point(4,4),4), test );
  for(int i = 0; i < num; ++i){
    cout << "TANGENTIAL " << i << ":" << test[i].first << "-" << test[i].second << endl;
  }
  cout << endl;
  return 0;
  */
  while(true){
    int n;
    int ans = 0;
    cin >> n;
    if(n==0)break;
    circle jewels[n];
    elem jewels_m[n];
    circle circles[2*n];
    for(int i = 0; i < n; ++i){
      elem x, y, r, m;
      cin >> x >> y >> r >> m;
      circles[2*i] = circle(point(x,y),r);
      circles[2*i+1] = circle(point(x,y),m+r);
      jewels[i] = circle(point(x,y),r);
      jewels_m[i] = m+r;
    }
    
    for(int i = 0; i < 2*n; ++i){
      for(int j = i+2; j < 2*n; ++j){
	line vl[4];
	int line_num = circles_tangential( circles[i], circles[j], vl );
	for(int k = 0; k < line_num; ++k){
	  line l = vl[k];
	  int cnt = 0;
	  //cout << l.fr << " - " << l.sc << endl;
	  for(int m = 0; m < n; ++m){
	    elem d = dist_l(l,jewels[m].c);
	    if( leq(d,jewels_m[m]) && geq(d,jewels[m].r) )++cnt;
	  }
	  ans = max(ans,cnt);
	}
	//cout << endl;
      }
    }
    if(n==1)ans=1;
    
    cout << ans << endl;
  }
  return 0;
}

Measured memory_bytes: 988