Lumber Jack and Number X

Number X is a number. He lives in a town where all the citizens are his friends, all his friends are numbers and every single one of them likes to have his mailbox visible so they can receive letters from their friends.

However, Lumber Jack is new in town and he is the postman. He comes from a neighbouring town, where everyone he met was a string. He himself happens to be a string, and he hates having to read a long sequence of numbers on the mailbox. Sometimes he would mess up and deliver the wrong letter!

Number X has found a solution. Instead of displaying his name as a number, he decided to split every two consecutive digits by inserting a dash between them. He now imagines how happy the postman will be when he will get to his enchanting mailbox... Help Number X make his mailbox more postman-readable by inserting a single dash between every two consecutive digits.


An integer X, representing Number X.


A string containing all digits of Number X, all consecutive digits being separated by a single dash.


  • 0 ≤ X < 109



Sponsors Gold