n = int(input()) count = 0 ans = "" m = n while m // 1000 > 0: m = m // 1000 count += 1 c = count for _ in range(count): m = n // pow(1000,c) if c > 0: ans += str(m) + "," c -= 1 else: ans += str(m) if count == 0: print(n) else: print(ans)