************************************************************************

      Program HotSpring_3

      Write(*,*)
      Write(*,*)'Give a value for s=Sqrt(kT/epsilon).'
      Read(*,*)s
      Write(*,*)
      Write(*,*)'Give a value for the number of moves.'
      Read(*,*)Nmoves
      Write(*,*)
      Write(*,*)
     #'Give a value for the maximum jump size (a positive number).'
      Read(*,*)DelPosMax

      Position=0
      BetaE=0
      Sum2=0
      Sum4=0
      Sum6=0
      Iran=99991

      Do 2 n=1, Nmoves

      DelPos=2*(Ran(Iran)-0.5)*DelPosMax
      dBetaE=(Position+DelPos)**2/s**2-BetaE

      If ((dBetaE.LT.0).OR.(Ran(Iran).LT.Exp(-dBetaE))) then
        Position=Position+DelPos
        BetaE=BetaE+dBetaE
      End If

      Sum2=Sum2+Position**2
      Sum4=Sum4+Position**4
      Sum6=Sum6+Position**6

    2 Continue

      AvePos2=Sum2/Nmoves
      AvePos4=Sum4/Nmoves
      AvePos6=Sum6/Nmoves

      Write(*,*)
      Write(*,*)'<X**2> = ',AvePos2
      Write(*,*)
      Write(*,*)'<X**4> = ',AvePos4
      Write(*,*)
      Write(*,*)'<X**6> = ',AvePos6

      End

************************************************************************	