How long should I keep my fingernails?

Short enough that you can play on the skin of the fingertips. Long nails tend to force playing with flat fingers, which can lead to improper piano technique and increase the chances of getting injured.