n = int(input()) ans = "" while n // 1000: ad = "," + str(n % 1000) ans = ad + ans n //= 1000 ans = str(n) + ans print(ans)