  let (bus, m) = firstBus minutes $ parseInput $ last xs
   in bus * m
  where
    minutes = read $ head xs

extendedEuclid :: (Integral a) => a -> a -> (a, a, a)
extendedEuclid 0 b = (b, 0, 1)
extendedEuclid a b =