#include <bits/stdc++.h>
using namespace std;
int main() {
  int i = 0, dec = 0;
  char s[110], x;
  while (cin >> x) {
    s[i] = x;
    if (x == '.') dec = i;
    i++;
  }
  if (s[0] == '-' && s[1] == '0') {
    cout << "($0.";
    if (dec + 1 < i && dec + 2 < i) {
      cout << s[dec + 1] << s[dec + 2] << ")\n";
    } else if (dec + 1 < i && dec + 2 >= i) {
      cout << s[dec + 1] << "0)\n";
    } else {
      cout << "00)\n";
    }
  } else if (s[0] == '0') {
    cout << "$0.";
    if (dec + 1 < i && dec + 2 < i) {
      cout << s[dec + 1] << s[dec + 2] << "\n";
    } else if (dec + 1 < i && dec + 2 >= i) {
      cout << s[dec + 1] << "0\n";
    } else {
      cout << "00\n";
    }
  } else if (s[0] == '-') {
    if (dec == 0) {
      int res = (i - 1);
      res = res % 3;
      if (res == 0) {
        res = 3;
      }
      cout << "($";
      for (int j = 1; j < i; ++j) {
        cout << s[j];
        res--;
        if (res == 0 && j != i - 1) {
          cout << ",";
          res = 3;
        }
      }
      cout << ".00)\n";
    } else {
      int res = dec - 1;
      res = res % 3;
      if (res == 0) {
        res = 3;
      }
      cout << "($";
      for (int j = 1; j < dec; ++j) {
        cout << s[j];
        res--;
        if (res == 0 && j != dec - 1) {
          cout << ",";
          res = 3;
        }
      }
      cout << ".";
      if (dec + 1 < i && dec + 2 < i) {
        cout << s[dec + 1] << s[dec + 2] << ")\n";
      } else if (dec + 1 < i && dec + 2 >= i) {
        cout << s[dec + 1] << "0)\n";
      } else {
        cout << "00)\n";
      }
    }
  } else {
    if (dec == 0) {
      int res = i;
      res = res % 3;
      if (res == 0) {
        res = 3;
      }
      cout << "$";
      for (int j = 0; j < i; ++j) {
        cout << s[j];
        res--;
        if (res == 0 && j != i - 1) {
          cout << ",";
          res = 3;
        }
      }
      cout << ".00\n";
    } else {
      int res = dec;
      res = res % 3;
      if (res == 0) {
        res = 3;
      }
      cout << "$";
      for (int j = 0; j < dec; ++j) {
        cout << s[j];
        res--;
        if (res == 0 && j != dec - 1) {
          cout << ",";
          res = 3;
        }
      }
      cout << ".";
      if (dec + 1 < i && dec + 2 < i) {
        cout << s[dec + 1] << s[dec + 2] << "\n";
      } else if (dec + 1 < i && dec + 2 >= i) {
        cout << s[dec + 1] << "0\n";
      } else {
        cout << "00\n";
      }
    }
  }
  return 0;
}
