#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  cin >> s;
  vector<char> n, d;
  int flag = 0;
  if (s[0] == '-') flag = 1;
  int flag2 = 1;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '-') continue;
    if (s[i] == '.') {
      flag2 = 0;
      continue;
    }
    if (flag2) {
      n.push_back(s[i]);
    } else {
      d.push_back(s[i]);
    }
  }
  d.push_back('0');
  d.push_back('0');
  string temp = "";
  for (int i = 1; i >= 0; i--) {
    temp += d[i];
  }
  temp += '.';
  int j = 0;
  for (int i = n.size() - 1; i >= 0; i--) {
    j++;
    temp += n[i];
    if (j % 3 == 0 && (i != 0)) temp += ',';
  }
  reverse(temp.begin(), temp.end());
  if (flag) {
    cout << "($";
    cout << temp;
    cout << ")";
  } else {
    cout << "$";
    cout << temp;
  }
}
