It doesn't appear to me why you're using 24, ulong.max requires 20 digits.