#include <bits/stdc++.h>
using namespace std;
int kkaass = 1;
string str;
int main() {
  cin >> str;
  int f = 0;
  if (str[0] == '-') {
    f = 1;
    str = str.substr(1);
  }
  string ma, dos;
  int k = 0;
  for (int i = 0; i < (int)str.size(); i++) {
    if (str[i] == '.') {
      for (int j = i + 1; k < 2 && j < (int)str.size(); j++, k++)
        dos.push_back(str[j]);
      goto hell;
    }
    ma.push_back(str[i]);
  }
hell:
  for (; k < 2; k++) dos.push_back('0');
  string ma1;
  for (int i = (int)ma.size() - 1, j = 0; i >= 0; i--, j++) {
    if (j % 3 == 0 && j != 0) ma1.push_back(',');
    ma1 += ma[i];
  }
  reverse(ma1.begin(), ma1.end());
  string fine = "";
  if (f) {
    fine += "($";
    fine += ma1;
    fine += '.';
    fine += dos;
    fine += ')';
  } else {
    fine += '$';
    fine += ma1;
    fine += '.';
    fine += dos;
  }
  cout << fine << endl;
  return 0;
}
