#include #include using namespace std; int main() { int a; cin >> a; int b = 1; int c = a; for (;c>=1000;) { c /= 1000; b++; } vector d(b); for (int i = 0; i < b; i++) { d[i] = a % 1000; a /= 1000; } for (int i = b-1; i >= 1; i--) { if (i!=b-1&&d[i] < 10) { cout << "00" << d[i] << ","; }else if (i != b - 1&&d[i] < 100) { cout << 0 << d[i] << ","; }else { cout << d[i] << ","; } } if (b-1!=0&&d[0] < 10) { cout << "00" << d[0] ; } else if (b-1!=0&&d[0] < 100) { cout << 0 << d[0]; } else { cout << d[0]<