Confused how this code is wrong,looks good.

package com.codegym.task.task06.task0606;
import java.io.*;
/*
Even and odd digits
*/
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));
String number = reader.readLine();
odd = 0;
even = 0;
int num = Integer.parseInt(number);
if(num / 10 ==0){
if(num %2 ==0){
even +=1;
}
if(num %2 !=0){
odd +=1;
}
}
else{
while(num / 10 >0){
int a = (num-(num/10)*10);
if(a%2 ==0){
even +=1;
}
else if( a%2 !=0){
odd +=1;
}
num = num/10;
}
}
System.out.println("Even: "+even+" Odd: "+odd);
}
}