#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  bool negative = false;
  bool decimal = true;
  if (s[0] == '-') {
    negative = true;
    s = s.substr(1, s.size());
  }
  int decimal_index = s.find('.');
  string integer_part = s.substr(0, decimal_index);
  string decimal_part;
  if (decimal_index != -1) {
    decimal_part = s.substr(decimal_index + 1, 2);
    if (decimal_part.size() == 1) decimal_part += '0';
  } else
    decimal_part = "00";
  if (negative) cout << "(";
  cout << "$";
  for (size_t i = 0; i < integer_part.size(); i++) {
    cout << s[i];
    if ((i + 1) % 3 == integer_part.size() % 3 && i != integer_part.size() - 1)
      cout << ",";
  }
  cout << "." << decimal_part;
  if (negative) cout << ")";
  return 0;
}
