import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
String str = scanner.nextLine();
char[] html = str.toCharArray();
int len = html.length;
int ans = 0, cnt = 0;
String open = "", close = "";
for (int i = 0; i < len; i++) {
if (html[i] == '<') {
if (len - i >= 5) {
if (str.substring(i, i+5).equals(open)) {
cnt++;
}
}
if (len - i >= 6) {
if (cnt>0 && str.substring(i, i+6).equals(close)) {
cnt--;
ans++;
}
}
}
}
System.out.println(ans);
}
}
我发现我应该不适合做游戏开发,还是老老实实投Java后端吧