public class Solution { public static int even; public static int odd; public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int q=Integer.parseInt(reader.readLine()); int a=1; for (int i=0;i<5;i++) { int c=q/a; if (c%2==0) even = even +1; else { odd=odd+1;} a=a*10; } System.out.println("Even: "+even+" Odd: "+odd); //напишите тут ваш код } }