convert input to integer