#include <bits/stdc++.h>
using namespace std;
int main() {
  bool neg = false, bfp = false;
  stringstream ss;
  string s, s2 = "", fp = "";
  cin >> s;
  if (s[0] == '-') {
    neg = true;
    s.erase(0, 1);
  }
  if (find(s.begin(), s.end(), '.') != s.end()) {
    bfp = true;
    int dotloc;
    dotloc = find(s.begin(), s.end(), '.') - s.begin();
    if (dotloc <= s.length() - 3) s.erase(dotloc + 3, s.length());
    fp = s.substr(dotloc);
    s.erase(find(s.begin(), s.end(), '.') - s.begin(), s.length());
  }
  reverse(s.begin(), s.end());
  for (int i = 0;; i++) {
    s2 += s[i];
    if (i == s.length() - 1) break;
    if ((i + 1) % 3 == 0) s2 += ',';
  }
  reverse(s2.begin(), s2.end());
  if (fp[0] == '.' && fp.length() < 3)
    fp += '0';
  else if (fp.length() < 1)
    fp += ".00";
  if (neg)
    cout << "($" << s2 << fp << ')';
  else
    cout << '$' << s2 << fp;
}
