import qualified Data.ByteString.Char8 as BS
import Data.Maybe

main :: IO ()
main = BS.getLine >>= print . solve . fst . fromJust . BS.readInt
    where solve n
            | odd n     = (n+1) `div` 2
            | otherwise = n `div` 2