How many significant figures? Given a number as input, determine how many significant figures it has. This number will should be taken as a string because you have to do some special formatting. You'll see what I mean soon (I think). 

A digit is a sig-fig if at least one of the following apply:


Non-zero digits are always significant.
Any zeros between two significant digits are significant.
final zero or trailing zeros in the decimal portion only are significant. 
all digits are significant if nothing follows the decimal place. 
when there are only zeroes, all but the last zero are considered leading zeroes


Input

A string or string array of the number. It might have a decimal point at the end without a digit after it. It might not have a decimal point at all. 

Output

How many sig-figs there are. 

Examples

1.240 -&gt; 4
0. -&gt; 1
83900 -&gt; 3
83900.0 -&gt; 6
0.025 -&gt; 2
0.0250 -&gt; 3
2.5 -&gt; 2
970. -&gt; 3
0.00 -&gt; 1
Retina, 29 27 bytes

Saved 2 bytes thanks to @MartinEnder

^0\.0*.|^\d(\d*?)0+$
1$1
\d


Try it online! | Test suite