This page is still under construction.

Parts of this page are still being built. What you see may change.

Receipt

Interview

Time limit1sMemory limit128 MB

Summary
Given the total price of 10 books and the prices of 9 of them, find the missing book's price.
Level

Easy1 of 10

Topics
Math, Implementation
Solved
No attempts yet

Problem

For the new semester, Sanggeun bought 10 books. He was so eager that he bought them without checking the prices, and now he wants to find out how much each book cost.

Unfortunately, the receipt got smudged, and Sanggeun can only read the prices of 9 of the 10 books.

Given the total price of all 10 books and the prices of the 9 readable books, write a program that finds the price of the one book whose price cannot be read.

Input

The first line contains the total price of the 10 books. Each of the next 9 lines contains the price of one readable book, one per line. Each book's price is a positive integer no greater than 10,000.

Output

Print the price of the one book whose price cannot be read.

Examples2

  1. Example 1

    Input
    9850
    1050
    800
    420
    380
    600
    820
    2400
    1800
    980
    
    Expected output
    600
    
  2. Example 2

    Input
    10
    1
    1
    1
    1
    1
    1
    1
    1
    1
    
    Expected output
    1