import qualified Data.Text.Lazy as T
import qualified Data.Text.Lazy.IO as T
import qualified Data.Text.Lazy.Read as T

main :: IO ()
main = do
  n <- unsafeTextToInt <$> T.getLine :: IO Int
  let
    n' = n - 1 :: Int
  print . sum . map (n' `div`) $ [1 .. n']

unsafeTextToInt :: T.Text -> Int
unsafeTextToInt s = case T.signed T.decimal s of
  Right (n, _) -> n
{-# INLINE unsafeTextToInt #-}
