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

#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 near(point a,point b){ eq(abs(b-a),0); }
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) ); }

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;
    return 2;
  }
}

int circles_tangential( 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(){
  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;
	  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);
	}
      }
    }
    if(n==1)ans=1;
    
    cout << ans << endl;
  }
  return 0;
}

Measured memory_bytes: 996