#include #include using namespace std; int main() { string ans; int i; long n; cin >> n; if (n == 0) {ans = "0";} for (i = 0; n > 0; i++) { if (i != 0 && i % 3 == 0) { ans = "," + ans; } ans = to_string(n % 10) + ans; n /= 10; } cout << ans << endl; return 0; }