while""do c=io.read(1)n=c>"/"and(n or 0)*8+(c>"4"and c-1 or c)or print(n)end