PROGRAM picalc
  IMPLICIT NONE

  DOUBLE PRECISION :: s, t
  INTEGER :: k

  
  k = 0
  s = 0.0d0
  DO
     t = (-1d0)**k / (k +0.5d0) / 3d0**(k+0.5d0)
     IF (ABS(t) < 1d-8) EXIT

     s = s + t
     k = k + 1
  END DO

  PRINT *, 3d0*s, k
  
END PROGRAM picalc
