#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  int t = 1;
  while (t--) {
    string s;
    cin >> s;
    int a = s.find(".");
    string t = s.substr(0, a);
    string q = "";
    int count = 0;
    string p = "";
    if (a != -1) {
      p = s.substr(a + 1);
    }
    for (int i = t.size() - 1; i >= 0; i--) {
      if (count == 3) {
        q += ',';
        count = 0;
        q += s[i];
      } else {
        q += s[i];
      }
      count++;
    }
    reverse(q.begin(), q.end());
    if (p.size() == 0) {
      q += ".00";
    } else {
      if (p.size() == 1) {
        q += '.';
        q += p[0];
        q += '0';
      } else if (p.size() > 1) {
        q += '.';
        string n = p.substr(0, 2);
        q += n;
      }
    }
    if (q[0] == '-' && q[1] == ',') {
      string t = "($";
      t += q.substr(2);
      t += ')';
      cout << t;
    } else if (s[0] == '-') {
      string t = "($";
      t += q.substr(1);
      t += ')';
      cout << t;
    } else {
      string t = "";
      t += '$';
      t += q;
      cout << t;
    }
  }
  return 0;
}
