#include<bits/stdc++.h>
using namespace std;
string st;
int bb[1000];
priority_queue<int,vector<int>,greater<int> > q;
int main()
{
int i,la,lc;
while(cin>>st)
{
la=8*st.size();
memset(bb,0,sizeof(bb));
for(i=0;i<st.size();i++)
{
bb[st[i]]++;
}
for(i=0;i<1000;i++)
{
if(bb[i]!=0)
{
q.push(bb[i]);
}
}
lc=0;
while(!q.empty())
{
int num=q.top();
q.pop();
if(!q.empty())
{
int m=q.top();
q.pop();
int t=num+m;
q.push(t);
lc+=t;
}
}
printf("%d %d %.1lf\n",la,lc,la*1.0/lc);
}
return 0;
}
using namespace std;
string st;
int bb[1000];
priority_queue<int,vector<int>,greater<int> > q;
int main()
{
int i,la,lc;
while(cin>>st)
{
la=8*st.size();
memset(bb,0,sizeof(bb));
for(i=0;i<st.size();i++)
{
bb[st[i]]++;
}
for(i=0;i<1000;i++)
{
if(bb[i]!=0)
{
q.push(bb[i]);
}
}
lc=0;
while(!q.empty())
{
int num=q.top();
q.pop();
if(!q.empty())
{
int m=q.top();
q.pop();
int t=num+m;
q.push(t);
lc+=t;
}
}
printf("%d %d %.1lf\n",la,lc,la*1.0/lc);
}
return 0;
}