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

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef pair<LL, LL> PLL;

#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())

#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

#define FF first
#define SS second

const double EPS = 1e-8;
const double PI  = acos(-1.0);
const LL MOD = 1e9+7;

class Point{
public:
  double x, y;

  Point(double x = 0.0, double y = 0.0) : x(x), y(y){}

  Point operator + (const Point& p) const{ return Point(x + p.x, y + p.y); }
  Point& operator += (const Point& p){ x += p.x; y += p.y; return *this;}
  Point operator - (const Point& p) const{ return Point(x - p.x, y - p.y); }
  Point& operator -= (const Point& p){ x -= p.x; y -= p.y; return *this;}
  Point operator * (double a) const{ return Point(a*x, a*y); }
  Point& operator *= (double a){ x *= a; y *= a; return *this;}
  Point operator / (double a) const{ return Point(x / a, y / a); }
  Point& operator /= (double a){ x /= a; y /= a; return *this;}

  double abs(){ return sqrt(norm()); }
  double norm(){ return x*x + y*y; }
  
  bool operator < (const Point &p) const{
	return x != p.x ? x < p.x : y < p.y;
  }
  
  //EPS??????????°??????????
  bool operator == (const Point &p) const {
	return fabs(x - p.x) < EPS && fabs(y - p.y) < EPS;
  }
  friend ostream& operator <<(ostream& os, const Point& p);
};
ostream& operator <<(ostream& os, const Point& p){
  return os << "(" << p.x << ","<<p.y << ")";
}
class Line{
public:
	Point p1, p2;
  Line(){}
  Line(const Point& p1_, const Point& p2_)
	: p1(p1_), p2(p2_)
  {}
};
typedef Point Vector;
class Circle{
public:
  Point c;
  double r;
  double m;
};

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

//???????????§??????
double cross(Vector a, Vector b){
	return a.x*b.y - a.y*b.x;
}
double getDistanceLP(Line l, Point p){
	return abs(cross(l.p2 - l.p1, p - l.p1) / (l.p2 - l.p1).abs());
}

vector<Point> tangent(Point p, Circle c){
  p -= c.c;
  vector<Point> res;
  double d = sqrt(p.norm() - c.r*c.r);
  res.PB(Point(c.r/p.norm()*(p.x*c.r+p.y*d), c.r/p.norm()*(p.y*c.r-p.x*d)));
  res.PB(Point(c.r/p.norm()*(p.x*c.r-p.y*d), c.r/p.norm()*(p.y*c.r+p.x*d)));
  res[0] += c.c;
  res[1] += c.c;
  return res;
}

vector<Line> common_tangent (Circle p, Circle q) {
  double pr = p.r, qr = q.r;
    Point pc = p.c, qc = q.c;
    double d = (pc - qc).abs(), dr = abs(pr - qr), sr = (pr + qr);

    vector<Line> ret;
    if (d > sr) {
        // cross pair
        Point cp = (pc * qr + qc * pr) / sr;
        vector<Point> pts = tangent(cp, p), qts = tangent(cp, q);
        ret.push_back(Line(pts[0], qts[0]));
        ret.push_back(Line(pts[1], qts[1]));
    } else if (abs(d - sr) < EPS) {
        // cross pair coinside
        Point cp = (pc * qr + qc * pr) / sr;
        ret.push_back(Line(cp, cp));
    } 

    if (d > dr) {
        // outer pair
        if (abs(pr - qr) < EPS) {
            Point v = (qc - pc) / d;
			v = Point(-v.y, v.x);
            ret.push_back(Line(pc + v, qc + v));
            ret.push_back(Line(pc - v, qc - v));
        } else {
            Point cp = pc + (qc - pc) * pr / (pr - qr);
            vector<Point> pts = tangent(cp, p), qts = tangent(cp, q);
            ret.push_back(Line(pts[0], qts[0]));
            ret.push_back(Line(pts[1], qts[1]));
        }
    } else if (abs(d - dr) < EPS) {
        // outer pair coinside
        Point cp = (qc - pc) * pr / (pr - qr);
        ret.push_back(Line(cp, cp));
    } 

    return ret;
}

int main(){
  cin.tie(0);
  ios_base::sync_with_stdio(false);

  int N;
  while(cin>>N,N){
	vector<Circle> cs(N);
	VI ms(N);
	REP(i,N) cin >> cs[i].c.x >> cs[i].c.y >> cs[i].r >> cs[i].m;

	auto check = [&](Line& l, Circle& c)->bool{
	  double d = getDistanceLP(l, c.c);
	  return c.r-EPS <= d && d <= c.r+c.m+EPS;
	};

	int ans = 1;
	REP(i,N) FOR(j,i+1,N){
	  Circle c1, c2;
	  c1 = cs[i], c2 = cs[j];
	  auto lines = common_tangent(c1,c2);
	  for(auto& l: lines)
		ans = max(ans, (int)count_if(ALL(cs),
								[&](Circle& c){return check(l,c);}));
	  c1.r += cs[i].m;
	  lines = common_tangent(c1,c2);
	  for(auto& l: lines)
		ans = max(ans, (int)count_if(ALL(cs),
								[&](Circle& c){return check(l,c);}));
	  c2.r += cs[j].m;
	  lines = common_tangent(c1,c2);
	  for(auto& l: lines)
		ans = max(ans, (int)count_if(ALL(cs),
								[&](Circle& c){return check(l,c);}));
	  c1.r = cs[i].r;
	  lines = common_tangent(c1,c2);
	  for(auto& l: lines)
		ans = max(ans, (int)count_if(ALL(cs),
								[&](Circle& c){return check(l,c);}));
	}
	cout << ans << endl;
  }
  
  return 0;
}