Count Asterisks

Easy
Strings String

Count asterisks '*' outside pairs of vertical bars '|'. Bars always come in pairs.

Constraints

1 ≤ len ≤ 1000

Examples

Example 1:
Input: l]|o]e*et|c]o|*de|
Output: 2
Example 2:
Input: iamprogrammer
Output: 0
▲ Console

Install Talent Arabia

Get instant access to jobs and career tools on your device.