# coding utf-8 num = str(input()) """ num = reversed(num) i = 0 for n in num: i += 1 ans.append(n) """ # len = 3k+0 -> 333,333 あと3 # len = 3k+1 -> 3,333,333 あと1 # len = 3k+2 -> 33,333,333 あと2 i = int(len(num) % 3) if i == 0: i = 3 for n in num[:len(num)-1]: print(n,end="") i -= 1 if i == 0: print(",",end="") i = 3 print(n[-1])