How to determine the size of the input?