Where is the bug?

import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc=new Scanner(System.in);
int k=sc.nextInt();
String s=sc.nextLine();
int ca=0,cb=0;
for(int i=0;i<s.length();++i){
if(s.charAt(i)==‘a’)
ca++;
else
cb++;
}
if(ca<=k){
if(cb<ca)
System.out.println(cb);
System.out.println(ca);
}
else if(cb<=k){
if(ca<cb)
System.out.println(ca);
System.out.println(cb);
}
}
}