while 1:print''.join(`-int(i)%10`for i in raw_input())