#include <bits/stdc++.h>
using namespace std;
string init_str;
string work(string str) {
  string res;
  int len = str.length();
  if (str[0] == '-') {
    str = str.substr(1, len - 1);
    len--;
  }
  int point = len;
  for (int i = 0; i < str.length(); ++i) {
    if (str[i] == '.') {
      point = i;
      break;
    }
  }
  for (int i = point - 1, j = 0; i >= 0; --i, j++) {
    if (j % 3 == 0 && j != 0) res = "," + res;
    char c[2];
    c[1] = 0;
    c[0] = str[i];
    string s = string(c);
    res = s + res;
  }
  res += ".";
  int floatlen = 0;
  for (int i = point + 1; i < len; ++i, ++floatlen) {
    if (floatlen == 2) break;
    char c[2];
    c[0] = str[i];
    c[1] = 0;
    res = res + string(c);
  }
  while (++floatlen <= 2) {
    res += "0";
  }
  return res;
}
int main() {
  cin >> init_str;
  string ans = work(init_str);
  if (init_str[0] == '-') {
    cout << "($" + ans + ")" << endl;
  } else {
    cout << "$" + ans << endl;
  }
}
