Officially the maximum supported length of a USB cable is ~5 metres. However, I've extended them a lot longer than this in the past. So my answer would be "as long as you can go until it stops working". If you buy a half-decent shielded USB cable I reckon you'll get away with 10 metres.