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