import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner kb = new Scanner(System.in);
String[] find = {"c=", "c-", "dz=", "d-", "lj", "nj", "s=", "z="};
String str = kb.next();
for (int i = 0; i < find.length; i++) {
if (str.contains(find[i]))
str = str.replace(find[i], "*");
}
System.out.println(str.length());
}
}
'공부기록 > 백준' 카테고리의 다른 글
[백준] 2018번 수들의 합 5 (0) | 2023.11.08 |
---|---|
[백준] 미로탐색 (0) | 2023.11.06 |
[백준] 9012번 괄호 (0) | 2023.10.15 |
[백준] 10773번 제로 (0) | 2023.10.15 |
백준 10828번 스택 (0) | 2023.10.11 |