program main
Implicit None
integer :: n,x

	read *, n
	
	if (n > 200)then
		x = 100
		n = n-900
		else
		x = 900
		n = n-100
	endif
	
	if(n > 20)then
		x= x + 10
		n = n-90
		else
		x = x + 90
		n = n-10
	endif
	
	if(n > 2)then
		x = x + 1
		else
		x = x + 9
	endif
	
	print 101,x
	
101 format (i0)

end program main