Luka is slacking again during chemistry class, while the teacher is explaining Avogadro’s law.

Luka first drew a table consisting of $3$ rows and $N$ columns. Then he wrote the numbers $1$ to $N$ into the first row in arbitrary order, each number appearing exactly once. In the other two rows he also wrote integers between $1$ and $N$, but didn’t care how many times a number appeared.

Luka can now delete any set of columns from the table. After doing so, he sorts the numbers in each row in ascending order.

He wants to obtain a table in which all three rows are identical after sorting. Write a program that determines the smallest number of columns he must delete.

For instance, in the first sample input below, Luka can delete the second, fourth, sixth and seventh columns. After deleting these and sorting each row, all three rows contain the numbers 1, 3 and 5.

## Input

The first line of input contains the integer $N$ ($1 \le N \le 100\, 000$), the number of columns in the table. The following three lines contain $N$ integers each, separated by single spaces. The numbers will be between $1$ and $N$, and there will be no duplicates in the first row.

## Output

Output the smallest number of columns Luka must delete.

Sample Input 1 Sample Output 1
7
5 4 3 2 1 6 7
5 5 1 1 3 4 7
3 7 1 4 5 6 2

4

Sample Input 2 Sample Output 2
9
1 3 5 9 8 6 2 4 7
2 1 5 6 4 9 3 4 7
3 5 1 9 8 6 2 8 7

2
{"ft_lang_label":"__label__en","ft_lang_prob":0.8716513,"math_prob":0.99400085,"size":1409,"snap":"2022-05-2022-21","text_gpt3_token_len":421,"char_repetition_ratio":0.12313167,"word_repetition_ratio":0.007067138,"special_character_ratio":0.29879346,"punctuation_ratio":0.08945687,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.98729765,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2022-05-19T05:13:37Z\",\"WARC-Record-ID\":\"<urn:uuid:deed0032-722d-4b49-b92c-2017175b398d>\",\"Content-Length\":\"18189\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:f397f6ca-5762-4bcb-b61b-5099e6d5dbaf>\",\"WARC-Concurrent-To\":\"<urn:uuid:f68ccb52-9c2f-4d3e-a403-db302e2724bc>\",\"WARC-IP-Address\":\"172.66.43.57\",\"WARC-Target-URI\":\"https://open.kattis.com/problems/avogadro\",\"WARC-Payload-Digest\":\"sha1:HBM2USJWSXJXJDQRPSNKVHDE2P3JDLXY\",\"WARC-Block-Digest\":\"sha1:HDNE3JPVQDEOHUUFQNWIFEXRUYQ4QDIA\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2022/CC-MAIN-2022-21/CC-MAIN-2022-21_segments_1652662525507.54_warc_CC-MAIN-20220519042059-20220519072059-00128.warc.gz\"}"}