import Control.Applicative ((<$>))
import Control.Monad (unless)

expectation :: Integral a => a -> [a] -> Double
expectation n ps
    | elem 1 ps = 0.0
    | otherwise = fromIntegral n / 2.0

main :: IO ()
main = do
    (n : _) <- map read . words <$> getLine
    unless (n == 0) $ do
        ps <- map read . words <$> getLine
        print $ expectation n ps
        main