public class Solution { public static int even; public static int odd; public static void main(String[] args) throws IOException { //write your code here BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int a = Integer.parseInt(reader.readLine()); while (a > 0) { int remainder = a % 10; if (a % 2 == 0) even++; else odd++; a = a / 10; } System.out.println("Even: " + even); System.out.println("Odd: " + odd); } }