#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  string s;
  cin >> s;
  bool m = false;
  if (s[0] == '-') s.erase(s.begin()), m = true;
  string ats;
  int en = s.size();
  for (int i = 0; i < s.size(); i++)
    if (s[i] == '.') {
      s += "0";
      ats += string(s.begin() + i, s.begin() + i + 3);
      en = i;
      break;
    }
  if (en == s.size()) ats = ".00";
  int k = 0;
  for (int i = en - 1; i >= 0; i--, k++) {
    ats = (i != en - 1 && k % 3 == 0 ? "," : "") + ats;
    ats = s[i] + ats;
  }
  if (m) cout << "(";
  cout << "$" << ats;
  if (m) cout << ")";
  return 0;
}
