#include <bits/stdc++.h>
using namespace std;
int main()
{
string s;
cin >> s;
double t = 1, cnt = 0, len = s.size();
if (s.front() == '-') t *= 1.5, len--;
if ((s.back() - '0')% 2 == 0) t *= 2;
for (auto c : s)
if (c == '2') cnt++;
printf("%.2lf%%", cnt / len * t * 100);
return 0;
}