__author__ = 'Zlobober' n = raw_input() ans = 1 for x in n: ans = 2 * ans + (1 if x == '7' else 0) print ans - 1
Standard input is empty
Standard output is empty
Traceback (most recent call last): File "prog.py", line 2, in <module> EOFError: EOF when reading a line