Submit solution

Points:
5 (partial)

Time limit:
2.0s

Memory limit:
128M

Author:

Problem type

Allowed languages

Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, ~~CommonLisp~~, D, Dart, F#, Forth, Fortran, Go, ~~Groovy~~, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, ~~Nim~~, ~~ObjC~~, OCaml, ~~Octave~~, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Code copying is a major problem on many online programming judges. There are coders, of which some of them copy code from others. Coder knows that **only** coder copied from them.

There is always some "sources" from which coders copy from. A "source" is defined as a coder who does not copy from anyone. Your task is to find out how many "sources" there are.

#### Input Specification

The first line will contain the integer , the number of coders there are.

The second line will contain integers, . The integer means that coder copies from coder . If , this means no coders copies from coder .

#### Output Specification

Output the number of "sources".

#### Subtasks

##### Subtask 1 [20%]

##### Subtask 2 [80%]

No further constraints.

#### Sample Input 1

```
5
0 1 1 3 2
```

#### Sample Output 1

`2`

#### Sample Input 2

```
9
0 1 1 3 4 5 6 4 6
```

#### Sample Output 2

`4`

## Comments