A 40 gig hard drive is actually really about 37.25 gigs (due to the way hard drive size is figured). 1 GB is 1024 MB. 1 MB is 1024 KB. 1 KB is 1024 bytes. So if you have a "40 GB" drive, it is really 40,000,000,000 bytes. 40,000,000,000 bytes ÷ 1024 = 39062500 KB ÷ 1024 = 38146.97265625 MB ÷ 1024 = 37.252902984619 GB (in actuality).
So, you've already "lost" 2.75 GB before any OS or applications go on it.
The way to upgrade the hard drive is to special-order it upgraded when you buy it.
The only way to upgrade later is by totally dismantling the iBook. It's better to have Apple do it at the start or order it from
Small Dog Electronics where custom-builds are also available (with about a two-week wait, I believe).
Unless you're planning on installing huge applications or on having an extensive iTunes and/or iPhoto library, you shouldn't have any worries. If you are planning on having any of those things, pop for the biggest hard drive you can afford right up front.