import Control.Monad

main :: IO ()
main = do
  ls <- getContents
  let ls' = map (map read . split) (lines ls)
      center = average ls'
      ls'' = ls' ++ [head ls']
  print $ solve center ls''

split :: String -> [String]
split s = split' s [[]]
split' :: String -> [String] -> [String]
split' [] save = save
split' (',':r) [str] = split' r [str,""]
split' (s:ss) [str] = split' ss [str ++ [s]]
split' (s:ss) [str1,str2] = split' ss [str1,(str2 ++ [s])]

average :: [[Double]] -> [Double]
average ls = division (foldl1 (\[ax,ay] [x,y] -> [ax+x, ay+y]) ls) (length ls)
  where
    division :: [Double] -> Int -> [Double]
    division [x,y] i = [x/(fromIntegral i),y/(fromIntegral i)]

solve :: [Double] -> [[Double]] -> Double
solve center [p1,p2] = tri center p1 p2
solve center (p1:p2:r) = (tri center p1 p2) + (solve center (p2:r))

tri :: [Double] -> [Double] -> [Double] -> Double
tri p1 p2 p3 = sqrt (z * (z - a) * (z - b) * (z - c))
  where
    distance :: [Double] -> [Double] -> Double
    distance [a,b] [c,d] = sqrt ((a-c)*(a-c) + (b-d)*(b-d))
    a = distance p1 p2
    b = distance p2 p3
    c = distance p3 p1
    z = (a + b + c) / 2