-----------------------------------------------------------------------------------------------------------------------------------
PROGRAM fuct
IMPLICIT NONE
INTEGER::n,s,t,i
READ*,n
t=1
s=0
DO i=1,n
t=t*i
s=s+t
END DO
PRINT*,s
END
-----------------------------------------------------------------------------------------------------------------------------------
PROGRAM fuct
IMPLICIT NONE
INTEGER::n,s,t,i
READ*,n
t=1
s=0
DO i=1,n
t=t*i
s=s+t
END DO
PRINT*,s
END