Problem Description

You are given variable declarations line by line in a tiny language: 'let x', 'block', 'end'. Count how many times a 'let x' shadows an existing x in an outer scope.

Input Format

n then n commands, one per line.

Output Format

One integer count.

Sample Test Case

Input:
7 let a block let a let b block let b end
Output:
2

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next