C  WA NO KEISAN

	PROGRAM SUN
	INTEGER I, N
	INTEGER S1, S2, S3, S4, S5

C	--- SHOKIKA ---
1	I=0
	S1=0
	S2=0
	S3=0
	S4=0
	S5=0
	
	WRITE(6,*)
	WRITE(6,*) 'N= ??'
	READ(5,*) N

	IF(N.LE.0)THEN
	  STOP
	ENDIF

2	I=I+1

	S1=S1+I
	S2=S2+I*I
	S3=S3+I**3
	S4=S4+I**4
	S5=S5+I**5

	IF(I.LT.N)THEN
	    GO TO 2
	  ELSE
	    WRITE(6,*) N, 'MADE NO WA'
	    WRITE(6,*) 'SUM I    =',S1
	    WRITE(6,*) 'SUM I**2 =',S2
	    WRITE(6,*) 'SUM I**3 =',S3
	    WRITE(6,*) 'SUM I**4 =',S4
	    WRITE(6,*) 'SUM I**5 =',S5
	    GO TO 1
	ENDIF

	END