#include <bits/stdc++.h>
using namespace std;
long long int n;
int main() {
  string x;
  cin >> x;
  bool minus = false;
  if (x[0] == '-') minus = true;
  string fm = "";
  string fa = "";
  int i = 0;
  for (i = 0; i < x.size(); i++) {
    if (x[i] == '-')
      continue;
    else if (x[i] == '.')
      break;
    else {
      fm.push_back(x[i]);
    }
  }
  for (i++; i < x.size(); i++) {
    fa.push_back(x[i]);
  }
  for (i = fa.size(); i < 2; i++) {
    fa.push_back('0');
  }
  if (minus) cout << "(";
  cout << "$";
  for (i = 0; i < fm.size(); i++) {
    if (i != 0 && (fm.size() - i) % 3 == 0) cout << ",";
    cout << fm[i];
  }
  cout << ".";
  for (i = 0; i < 2; i++) {
    cout << fa[i];
  }
  if (minus) cout << ")";
  return 0;
}
