If you are doing this in the shell and you want a one-liner, try this:
Get-ChildItem "\\$(Read-Host)\share" -recurse | Measure-Object length -sum
This won't produce a message asking for input, but saves assigning to a variable that you may not need, and if you are running this from the shell then you know the input that is needed anyway!
Also double quotes will mean a variable is evaluated so:
$hello = "Hello World"
Write-Host "$hello"
Hello world
Or as Keith Hill has pointed out:
$hello = "Hello World"
Write-Host $hello
Hello World
Where as single quotes won't evaluate the variable so:
$hello = "Hello World"
Write-Host '$hello'
$hello
So if you are using variables and you have spaces in the path use " ".