$_=<>;print+/^13+$/?length($_)-2:-1