{-# OPTIONS_GHC -fno-warn-type-defaults #-}
module Main where

import Data.List

main :: IO ()
main = readLn >>= print . (*1000) . yamikin 100 1.05

yamikin :: Int -- ^ ?????¬?????????????????????
        -> Double -- ^ ??????
        -> Int -- ^ ??±
        -> Int -- ^ ???????????????????????????
yamikin c r n = foldl' f c [1..n]
  where
    f b _
        | d > 0     = m + 1
        | otherwise = m
      where
        (m,d) = properFraction $ fromIntegral b * r