#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  cin >> str;
  int flag = 0;
  if (str[0] == '-') {
    flag = 1;
  }
  int plag = 0;
  string htr = "", ptr = "";
  for (int i = 0; i < str.length(); i++) {
    if (str[i] == '-')
      continue;
    else if (str[i] == '.') {
      plag = 1;
    } else if (plag == 1) {
      htr += str[i];
      if (htr.length() == 2) break;
    } else {
      ptr += str[i];
    }
  }
  if (htr.length() == 0)
    htr += "00";
  else if (htr.length() == 1)
    htr += "0";
  string ltr = "";
  int y = 0;
  for (int i = ptr.length() - 1; i >= 0; i--) {
    ltr = ptr[i] + ltr;
    y++;
    if (y == 3 && i != 0) ltr = ',' + ltr;
    y = y % 3;
  }
  if (flag == 1) {
    cout << "($" << ltr << "." << htr << ")";
  } else {
    cout << "$" << ltr << "." << htr;
  }
}
