Submit Submissions Statistics

Problem ID: knot-knowledge

Time Limit: 1.0 seconds

Memory Limit: 32.0 MB

Difficulty: Medium

Knot Knowledge

Description

Sonja the scout is taking a test to see if she knows all the knots a scout is supposed to know. The Scout's Big Book of Knots has descriptions of $1\,000$ different knots, conveniently numbered from $1$ to $1\,000$. For the test, Sonja needs to learn a specific set of $n$ of these knots. After some intense studying, she has learned all except one of them, but she has forgotten which knot she does not yet know.

Given the list of knots Sonja needs to learn, and the ones she has learned so far, find the remaining knot to learn.

Input format

The first line of input consists of an integer $n$ ($2 \le n \le 50$), the number of knots Sonja needs to learn. This is followed by a line containing $n$ distinct integers $x_1, \ldots, x_n$ ($1 \le x_i \le 1\,000$), the knots that Sonja needs to learn. Finally, the last line contains $n-1$ distinct integers $y_1, \ldots, y_{n-1}$ ($1 \le y_i \le 1\,000$), the knots that Sonja has learned so far. You may assume that each knot Sonja has learned is one of the $n$ knots she was supposed to learn.

Output format

Output the number of the remaining knot that Sonja needs to learn.

Input Sample 1

4
10 101 999 1
1 999 101

Output Sample 1

10

Input Sample 2

4
1 2 4 3
4 2 3

Output Sample 2

1