human
Write me a Python program to find Amir, one of his schoolmates and good friends given the following:
A few years ago Sajjad left his school and register to another one due to security reasons. Now he wishes to find Amir, one of his schoolmates and good friends.

There are n schools numerated from 1 to n. One can travel between each pair of them, to do so, he needs to buy a ticket. The ticker between schools i and j costs  and can be used multiple times. Help Sajjad to find the minimum cost he needs to pay for tickets to visit all schools. He can start and finish in any school.

Input

The first line contains a single integer n (1 ≤ n ≤ 105) — the number of schools.

Output

Print single integer: the minimum cost of tickets needed to visit all schools.

Examples

Input

2

Output

0

Input

10

Output

4

Note

In the first example we can buy a ticket between the schools that costs .
Using python can you solve the prior task?
assistant
#Here is Python program to find Amir, one of his schoolmates and good friends.

# helper methods for input
def ri():
    return raw_input()

def ii(type):
    x = ri()
    if type == 'i':
        return int(x)
    if type == 'l':
        return long(x)
    if type == 'f':
        return float(x)
    if type == 's':
        return str(x)
    return

def i2(type):
    x = ri().split()
    if type == 'i':
        return int(x[0]), int(x[1])
    if type == 'l':
        return long(x[0]), long(x[1])
    if type == 'f':
        return float(x[0]), float(x[1])
    if type == 's':
        return str(x[0]), str(x[1])
    return

def ni(type):
    array = ri().split()
    def doforall(x):
        if type == 'i':
            return int(x)
        if type == 'l':
            return long(x)
        if type == 'f':
            return float(x)
        if type == 's':
            return str(x)
        return
    array = map(doforall, array)
    return array

def pr(array):
    def tostring(el):
        return str(el)
    print ' '.join(map(tostring, array))

def fndec(x):
    return '{0:.6f}'.format(x)

# main
n = ii('f')
import math
print int(math.ceil(n/2.0)-1)