n = int(input()) ans = "" while n // 1000: ad = "," + "{0:03d}".format(n % 1000) ans = ad + ans n //= 1000 ans = str(n) + ans print(ans)