program c
    real :: x, k, exist, rest
    exist = 0
    
    read *, x

    ! k個買うと仮定
    ! 100k円をxから引き、残りが[0, 5*k] なら帳尻合わせ可能
    do k = 0, x
        rest = x - 100 * k
        if (0 .le. rest .and. rest .le. 5*k) then
        	exist = 1
            exit
        end if
    end do
    
    ! 結果出力
    print '(i0)', int(exist)
    
end program c