Timus Online Judge 1005