include
include
include
using namespace std;
int main()
{
int a, b, inte, mod;
cin >> a >> b;
inte = a / b, mod = a % b;
if(!mod) cout << inte << endl;
else
{
string res = to_string(inte) + ".", deci;
vector<int> myh(b, -1);
int i = 0;
while(mod && myh[mod] == -1)
{
myh[mod] = i++;
inte = mod * 10 / b, mod = mod * 10 % b;
deci.push_back(inte + '0');
}
if(mod)
deci = deci.substr(0, myh[mod]) + "(" + deci.substr(myh[mod]) + ")";
res += deci;
cout << res << endl;
}
return 0;
}</int>