It says you need a multiple of 16 sts plus 1, so 33 would work. I don't know if that will be enough sts for your dog though. The reason 40 sts doesn't work is because of the 8 and 16 st stitch patterns. She does say you could cast on 10 sts less and it would be smaller, so 39 might work and you could do a few sts in seed stitch in between the X diamond border and welted leaf patterns. Look at the basic sweater link to get an idea of the basic pattern; it should say how to measure your dog to get the sweater the correct size.