fork(5) download
  1. __author__ = 'Zlobober'
  2. n = raw_input()
  3. ans = 1
  4. for x in n:
  5. ans = 2 * ans + (1 if x == '7' else 0)
  6. print ans - 1
Runtime error #stdin #stdout #stderr 0.01s 7692KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
Traceback (most recent call last):
  File "prog.py", line 2, in <module>
EOFError: EOF when reading a line