	FUNCTION MAG(I)
C	RETURNS (NUMBER OF DIGITS IN I) + 1
C	USED FOR VARIABLE FORMATTING:  I<MAG(I)>, PUTS SPACE IN FRON
C	OF OUTPUT NUMBER
	MAG=2
	K=IABS(I)
	IF(K.GT.9) MAG=3
	IF(K.GT.99) MAG=4
	IF(K.GT.999) MAG=5
	IF(K.GT.9999) MAG=6
	IF(I.LT.0) MAG=MAG+1
	RETURN
	END
