#include <bits/stdc++.h>
using namespace std;
string str;
string get_dec(string dec) {
  string ret;
  reverse(dec.begin(), dec.end());
  for (int i = 0; i < dec.size(); i++) {
    if ((i) % 3 == 0 && i != 0) ret += ',';
    ret += dec[i];
  }
  reverse(ret.begin(), ret.end());
  return '$' + ret;
}
string get_frc(string frc) {
  string ret;
  int i = 0;
  for (; i < frc.size() && i < 2; i++) {
    ret += frc[i];
  }
  while (i < 2) {
    ret += '0';
    i++;
  }
  return ret;
}
int main() {
  int f = 0;
  string dec;
  string frc;
  int i = 0;
  cin >> str;
  if (str[0] == '-') {
    f = 1;
    i++;
  }
  while (str[i] != '.' && i < str.size()) {
    dec += str[i];
    i++;
  }
  i++;
  while (i < str.size() && str.size()) {
    frc += str[i];
    i++;
  }
  dec = get_dec(dec);
  frc = get_frc(frc);
  if (f == 1)
    cout << "(" << dec << "." << frc << ")"
         << "\n";
  else
    cout << dec << "." << frc << "\n";
}
