The Canon S3 and S5 are both fully-compatible with SDHC cards; you should have no problems with any of them.
SDHC cards come in different speed classes, but even the slowest will work just fine in an S3/S5. However, it *might* affect the speed of the continuous mode if it's one of the slowest ones. If you use your S5's high-speed mode a lot (for more than 5-6 pics at a time) make sure to buy a Class 4 or Class 6 card ... otherwise, you won't notice any difference.
IIRC, the Class 4's are about as fast as an SD UltraII, which is more than fast enough to keep up with an S3/S5.