LearnPy Hub
← Arena
IntermediateRating 1200

Read a Number from Text

Turn the text into an integer like this: skip leading spaces, read an optional + or −, then read digits until a non-digit. If there are no digits, the answer is 0. Clamp the result to the range −2147483648 … 2147483647.

Input

One line of text.

Output

One integer.

Sample 1

Input
42
Output
42

Sample 2

Input
   -42
Output
-42
solution.py
Output appears here
Read a Number from Text · Python Arena problem · LearnPy Hub