#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const int inf = (int)1e9;
const double inf1 = 1e-9;
const int ss = (int)1e6 + 3;
int main() {
  string s;
  getline(cin, s);
  int sz = s.find(".");
  int z1 = 0;
  if (sz == -1) {
    sz = s.size();
    z1 = -1;
  }
  string res;
  int z = 0;
  if (s[0] == '-') {
    res = "(";
    z = 1;
  }
  res += "$";
  for (int i = z; i < (sz - z) % 3 + z; ++i) res += s[i];
  if ((sz - z) % 3 != 0) res += ",";
  string tmp;
  for (int i = (sz - z) % 3 + z; i < sz; i += 3) {
    res += s[i];
    res += s[i + 1];
    res += s[i + 2];
    res += ",";
  }
  res.erase(res.size() - 1, 1);
  res += ".";
  s += "00";
  res += s[sz + 1 + z1];
  res += s[sz + 2 + z1];
  if (s[0] == '-') {
    res += ")";
  }
  cout << res;
  return 0;
}
