import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String str = input.next();
char[] ch = str.toCharArray();
//设置计数,计算2的个数
double count = 0;
double number = 1;
//计算字符串中2的个数
for (int i = 0; i < ch.length; i++) {
if(ch[i] == '2'){
count++;
}
}
//判断是否为负数,是负数并且是偶数
if(ch[0] == '-' && Integer.parseInt(str.charAt(str.length()-1)+"")%2==0){
number = ((count/(ch.length-1))*1.5*2)*100;
}
//是负数,但不是偶数
else if(ch[0] == '-' && Integer.parseInt(str.charAt(str.length()-1)+"")%2!=0){
number = ((count/(ch.length-1))*1.5)*100;
}
//不是负数,但是偶数
else if(ch[0] != '-' && Integer.parseInt(str.charAt(str.length()-1)+"")%2==0){
number = ((count/ch.length)*2)*100;
}
//既不是负数,也不是偶数
else {
number = (count/ch.length)*100;
}
System.out.println((String.format("%.2f", number))+"%");
}
}
12-08
965
03-10
447