Timus Online Judge 1044