DIUPC 2010 Problem I

c
contestcompetitive-programming]
c