#include <bits/stdc++.h>
bool ascending(int i, int j) { return (i < j); }
bool descending(int i, int j) { return (i > j); }
using namespace std;
int main() {
  string s;
  cin >> s;
  bool minus = false;
  string integ, dec;
  if (s[0] == '-') minus = true;
  const int isMin = (minus ? 1 : 0);
  int i = isMin;
  bool reached = false;
  while (i < s.length()) {
    if (s[i] == '.') {
      reached = true;
      integ = s.substr(isMin, i - isMin);
    }
    i++;
  }
  if (reached)
    dec = s.substr(integ.size() + isMin + 1);
  else {
    integ = s.substr(isMin);
    dec = "00";
  }
  if (atoi(integ.c_str()) == 0 && atoi(dec.c_str()) == 0) {
    cout << "$0.00";
    return 0;
  }
  while (dec.size() < 2) dec += "0";
  dec = dec.substr(0, 2);
  for (int i = integ.length() - 3; i > 0; i -= 3)
    integ = integ.substr(0, i) + "," + integ.substr(i, integ.length() - i);
  string ret = "$" + integ + "." + dec;
  if (minus) ret = "(" + ret + ")";
  cout << ret;
}
