#include<bits/stdc++.h>
using namespace std;

typedef complex<double> P;
typedef pair<P,P> L;

const double EPS = 1e-8;

namespace std {
  bool operator<(const P& a,const P& b) {
    return abs(a.real()-b.real()<EPS)?a.imag()<b.imag():a.real()<b.real();
  }
};

struct Circle {
  P c;
  double r;
  Circle( P c=P(0,0), double r=0 ):c(c),r(r){}
};

double dot( P a, P b ){ return a.real() * b.real() + a.imag() * b.imag(); }

P rotate( P v, double rad ){
  return v * P( cos(rad), sin(rad) );
}
P proj(P p, L l){
    return l.first + dot(p - l.first, l.second - l.first) / norm(l.second - l.first) * (l.second - l.first);
}
 
P reflect(P p, L l){
  return p + (proj(p,l) - p) * 2.0;
}
 
vector<L> tangentCC( Circle p, Circle q ){
  vector<L> ret;
  if( p.r < q.r ) swap( p, q );
  //外接線
  P v = q.c - p.c;
  //cout << p.c << " - " << q.c << " "<<  v << endl;
  if( abs( abs(v) + q.r - p.r ) < EPS ) {//外接戦一つ
    P p1 = p.c + v/abs(v) * ( abs(v) + q.r );
    P p2 = p1 + rotate( v, M_PI/2.0 );
    ret.push_back( L( p1, p2) );
    return ret;
  } else if( abs(v) + q.r < p.r ) return ret; //接戦無し 
  double z = sqrt( abs(norm(v) - (p.r-q.r)*(p.r-q.r)) );
  v = rotate( -v, acos(min(1.0,z/abs(v))) )/abs(v) * z + q.c - p.c;
  if( abs(v)<EPS ){ v = q.c - p.c; v = P( -v.imag(), v.real() ); }   
  v /= abs(v);
  //cout << "rotate: " << v << endl;
  L s = L( p.c + v * p.r , q.c + v * q.r );
  ret.push_back( s );
  s = L( reflect( s.first, L(p.c,q.c) ), reflect( s.second, L(p.c,q.c) ) );
  ret.push_back( s );
  //内接線
  v = q.c - p.c;
  if( abs( abs(v) - p.r-q.r ) < EPS ){//内接線一つ
    P p1 = p.c + v/abs(v) * p.r;
    P p2 = p1 + rotate( v, M_PI/2.0 );
    ret.push_back( L(p1,p2) );
    return ret;
  } else if( abs(v) - p.r-q.r < EPS ){//内接線なし
    return ret;
  }
  P v1 = rotate( v, acos((p.r+q.r)/abs(v)) )/abs(v);
  P p1 = p.c + v1 * p.r;
  P p3 = reflect( p1, L(p.c,q.c) );
  v1 = rotate( -v, acos((p.r+q.r)/abs(v)) )/abs(v);
  P p2 = q.c + v1 * q.r;
  P p4 = reflect( p2, L(p.c, q.c) ); 
  ret.push_back( L( p1,p2 ) );
  ret.push_back( L( p3,p4 ) );
  return ret;
}

int N;

int main(){
  while(cin >> N && N){
    vector<Circle> C;
    vector<Circle> M;
    for(int i=0;i<N;i++){
      int x,y,r,m;
      cin >> x >> y >> r >> m;
      C.push_back( Circle( P(x,y), r ) );
      M.push_back( Circle( P(x,y), r+m ) );
    }  


    vector<L> line;
    for(int i=0;i<N;i++){
      for(int j=i+1;j<N;j++){
        vector<L> nl = tangentCC( C[i], C[j] );
        copy( nl.begin(), nl.end(), back_inserter( line ) );
        nl = tangentCC( C[i], M[j] );
        copy( nl.begin(), nl.end(), back_inserter( line ) );
        nl = tangentCC( M[i], C[j] );
        copy( nl.begin(), nl.end(), back_inserter( line ) );
        nl = tangentCC( M[i], M[j] );
        copy( nl.begin(), nl.end(), back_inserter( line ) );
      }
    }

    if( N < 2 ) {
      cout << N << endl;
      continue;
    }

    int res = 0;
    for(int i=0;i<(int)line.size();i++){
      int cnt = 0;
      //cout << line[i].first << " - " << line[i].second << endl;
      for(int j=0;j<N;j++){
        double x = abs(C[j].c - proj( C[j].c, line[i] ));        
        //cout << j << ": " << x << "  "<< C[j].r << " " << M[j].r << endl;
        if( C[j].r < x+EPS && x < M[j].r+EPS ) cnt++;
      }
      res = max( res, cnt );
    }

    cout << res << endl;
  }
}

Measured memory_bytes: 2724