#include <bits/stdc++.h>
using namespace std;
string Reverse(string st) {
  string res = "";
  int N, i;
  for (N = st.length(), i = 0; i < N; ++i) {
    res = st[i] + res;
  }
  return res;
}
int main() {
  string st, tmp, frac;
  int N, i;
  bool minus_;
  cin >> st;
  i = st.find(".");
  if (i == -1) {
    st += ".00";
  } else {
    if (i == st.length() - 2) st += "0";
  }
  if (st[0] == '-') {
    minus_ = true;
    st.erase(0, 1);
  } else {
    minus_ = false;
  }
  i = st.find(".");
  tmp = st.substr(0, i);
  frac = st.substr(i + 1, 2);
  st = Reverse(tmp);
  for (tmp = "", N = st.length(), i = 0; i < N; ++i) {
    tmp += st[i];
    if (i % 3 == 2 && i && i - N + 1) tmp += ",";
  }
  st = Reverse(tmp);
  if (minus_)
    cout << "($" << st << "." << frac << ")";
  else
    cout << "$" << st << "." << frac;
  return 0;
}
