N =int(input()) l =[] while N != 0: l.append(str(N%1000)) N = N//1000 print(",".join(l[-1::-1]))