-module(n). -export([m/0]). m()->f(io:get_line('')). f(S)->io:format(S),case S of"0 "->0;"10"++T->f([$9|T]);[A|B]->f([A-1|B])end.