Problem:
 Score : 100 points    Problem Statement How many ways are there to choose two distinct positive integers totaling N , disregarding the order?      Constraints  1 \leq N \leq 10^6  N is an integer.         Input Input is given from Standard Input in the following format:  N       Output Print the answer.        Sample Input 1 4      Sample Output 1 1  There is only one way to choose two distinct integers totaling 4 : to choose 1 and 3 . (Choosing 3 and 1 is not considered different from this.)       Sample Input 2 999999      Sample Output 2 499999

Solution (Python):
import math
N=int(input())
ans=int(math.ceil(N/2.0)-1)
print(ans)

Solution (Python):
n = int(input())
if n%2 == 0:
  ans = int(n/2 - 1)
else:
  ans = int((n-1)/2)
print(ans)

Solution (Python):
N = int(input())
if N%2 == 0:
  print(N//2 - 1)
else:
  print(N//2)

Solution (Python):

import sys
read = sys.stdin.readline


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_matrix(H):
    '''
    H is number of rows
    '''
    return [list(map(int, read().split())) for _ in range(H)]


def read_map(H):
    '''
    H is number of rows
    文字列で与えられた盤面を読み取る用
    '''
    return [read()[:-1] for _ in range(H)]


def read_col(H, n_cols):
    '''
    H is number of rows
    n_cols is number of cols

    A列、B列が与えられるようなとき
    '''
    ret = [[] for _ in range(n_cols)]
    for _ in range(H):
        tmp = list(map(int, read().split()))
        for col in range(n_cols):
            ret[col].append(tmp[col])

    return ret


N = read_a_int()
if N % 2:
    print(N // 2)
else:
    print(N // 2 - 1)

Solution (Python):
from fractions import gcd
from datetime import date, timedelta
from heapq import*
import math
from collections import defaultdict, Counter, deque
import sys
from bisect import *
import itertools
import copy
sys.setrecursionlimit(10 ** 7)
MOD = 10 ** 9 + 7


def modpow(a, n, mod):
    res = 1
    while n > 0:
        if n & 1:
            res = res * a % mod
        a = a * a % mod
        n >>= 1
    return res



def main():
    n = int(input())
    if n % 2 == 0:
        print((n - 1) // 2)
    else:
        print(n//2)

    
    

        
        
        
            

    
   


if __name__ == '__main__':
    main()

Solution (Python):
import math

n=int(input())

print(math.floor((n-1)/2))

Solution (Python):
N = int(input())

if N % 2 == 0:
    print(N // 2 - 1)
else:
    print((N + 1) // 2 - 1)

Solution (Python):
N=int(input())
if N%2==0:
  print(N//2-1)
else:
  print(N//2)

Solution (Python):
n = int(input())
if n % 2:
    print(n//2)
else:
    print(n//2 -1)

Solution (Python):


N=int(input())

count=-1
for i in range(N//2+1):
    count+=1

if N%2==0:
    print(count-1)
else:
    print(count)

Solution (Python):

import sys
def input():
    return sys.stdin.readline().rstrip()

def main():
    N=int(input())
    
    print(N//2 if N%2 else N//2 - 1)



if __name__ == '__main__':
    main()

Solution (Python):
n=int(input())
if n%2==0:
  print(int(n/2-1))
else:
  print(int((n-1)/2))

Solution (Python):
i = int(input()) 
if i%2==0:
    x=i/2-1
    print(int(x))
else:
    x=(i-1)/2
    print(int(x))

Solution (Python):
n=int(input())
ans=0
if n%2==1:
  print(n//2)
else:
  print(n//2-1)

Solution (Python):
N = int(input())
print((N-1) // 2)

Solution (Python):
n = int(raw_input())
if n == 1:
  print 0
  exit(0)
ans = n/2
if n%2 == 0:ans -= 1
print ans

Solution (Python):
N = int(input())
ans = 0
if N % 2 == 0:
    print(N//2-1)
else:
    print(N//2)

Solution (Python):
n = int(input())

if n <=2:
    print(0)
else:
    if n%2==0:
        print(n//2 -1)
    else:
        print((n-1)//2)

Solution (Python):




import sys














def main():
    n = int(sys.stdin.readline().rstrip())
    if n % 2 == 0:
        ans = n // 2 - 1
    else:
        ans = n // 2
    print(ans)


if __name__ == "__main__":
    
    main()

Solution (Python):
N = int(input())

if (N % 2 == 1):
    ans = (N-1) / 2
else:
    ans = N/2 - 1

print(int(ans))

Solution (Python):
n= int(input())
print((n+1)//2-1)

Solution (Python):
N = input()
if (int( N )%2) == 0:
    print( int(int(N) / 2 -1) )
else:
    print( int((int(N)-1)/2) )

Solution (Python):



n = int(input())



count = 0
div, mod = divmod(n, 2)
for i in range(1, n // 2 + 1):
    a = i
    b = n - a
    
    if a == b:
        continue

    
    count += 1
    
print(count)

Solution (Python):
s=int(input())

cnt=0
if s%2==0:
    cnt=s//2-1
elif s%2!=0:
    cnt=s//2
print(cnt)

Solution (Python):
n=int(input())
if(n%2==0):
    n=n-1
print(n//2)

Solution (Python):


n = int(raw_input())
if (n % 2) == 0:
  print(int((n/2)-1))
else:
  print(int((n-1)/2))

Solution (Python):
N = int(input())
target_list = []
if N % 2 == 1:
    N += 1
for i in range(1, int(N/2)):
    target = N - i
    if target == i:
        continue
    else:
        target_list.append(target)

print(len(target_list))

Solution (Python):
n=int(input())
if n%2==1:
  print(n//2)
else:
  print(n//2-1)

Solution (Python):
N=int(input())
if N % 2==0:
    print(N//2-1)
else:
    print(N//2)

Solution (Python):
N = int(input())
if (N - 1) % 2 == 0:
    a = (N-1) / 2
    print(int(a))

else:
    b = N / 2 - 1
    print(int(b))

Solution (Python):
A = int(input())
print(int((A-1)/2))

Solution (Python):
n = int(input())

if n-2 == 0:
    print(0)
elif n%2 == 0:
    if n != 3:
        print(int(n/2)-1)
    else:
        print(1)
else:
    print(int(n/2))

Solution (Python):
N = int(input())
print(N // 2 - 1 + (N % 2))

Solution (Python):
n = int(input())
if n % 2 == 0:
  print(int(n/2 - 1))
else:
  print(int((n-1)/2))

Solution (Python):
N = int(input())
if N%2==0:
    output = int(N//2-1)
else:
    output = int(N//2)

print(output)

Solution (Python):
from math import ceil, floor
N = int(input())
half = floor(N / 2)
count = 0
for i in range(half):
  count = count + 1
if N % 2 != 0:
  print(count)
else:
  print(count - 1)

Solution (Python):
n = int(input())
count = 0
max_n = int(n/2) if n%2 ==0 else int((n+1)/2)
for i in range(1, max_n):
    count+=1
print(count)

Solution (Python):
N = int(input())
r, mod = divmod(N, 2)
print(r - 1 + mod)

Solution (Python):
N = int(input())
count = 0
for up_from_0 in range(1,N):
  down_from_N = N-up_from_0
  if up_from_0 < down_from_N :
    count += 1
print(count)

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 998244353
inf = float('INF')


def A():
    n = II()
    n -= 1
    print(n // 2)
    return


def combination_mod(n, k, mod=mod):
    """ power_funcを用いて(nCk) mod p を求める """ 
    """ nCk = n!/((n-k)!k!)を使用 """

    from math import factorial
    if n < 0 or k < 0 or n < k: return 0
    if n == 0 or k == 0: return 1
    a = factorial(n) % mod
    b = factorial(k) % mod
    c = factorial(n - k) % mod
    return (a * pow(b, mod - 2, mod) * pow(c, mod - 2, mod)) % mod
    

def B():
    n = II()
    d = LI()
    dic = defaultdict(int)
    if d[0] != 0 or 0 in d[1:]:
        print(0)
        return
    for di in d[1:]:
        dic[di] += 1
    ans = 1
    di = list(dic.items())
    di.sort()
    be = 1
    for _, b in di:
        ans *= pow(be, b, mod)
        be = b
    print(ans)
    return


def C():
    return


def D():
    return


def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == '__main__':
    A()

Solution (Python):
target = int(input())
if(target%2==0):
  print(int(target/2-1))
else:
  	print(int((target+1)/2-1))

Solution (Python):

N = int(input())

count=0
for i in range(1,int(N/2)+1):

  
  count += 1

if(N%2 == 0):
  count -= 1


print(count)

Solution (Python):
N = int(input())


if N % 2 == 0:
    print(N//2-1)
else:
    print(N//2)

Solution (Python):
n=int(input())
if n<3:
    print(0)
elif n%2==0:
    print(int((n/2)-1))
else:
    print(int(n//2))

Solution (Python):


n = int(input())

if (n%2==0):
	ans = n/2 - 1
else:
	ans = (n-1) / 2 

print(int(ans))

Solution (Python):


import sys
import math


debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        
        
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    n = int(lines[0])

    return (n, )

def solve(n):

    if n <= 2:
        return 0
    
    k = (n - 1 ) // 2  
    

    return int(k)
    


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

Solution (Python):
print((int(input())-1)//2)

Solution (Python):




 
from collections import* 
from fractions import gcd
from functools import* 
from itertools import* 
from operator import mul,itemgetter
from bisect import* 
from heapq import* 
from math import factorial,pi
from copy import deepcopy
import sys
sys.setrecursionlimit(10**8)


def main():
    n=int(input())
    ans=0
    for i in range(1,n):
        if (i!=n-i and i<n-i):
            ans+=1
        elif i>n-1:
            break
    print(ans)
    
    
if __name__ == '__main__':
    main()

Solution (Python):
n = int(input().rstrip())
if n%2==0:
  print(int(n/2-1))
else:
  print(int((n-1)/2))

Solution (Python):
n = int(input())
if n % 2 == 0:
    print(n//2 -1)
else:
    print(n//2)

Solution (Python):
N = int(input())
if N%2 == 0:
    print(N//2-1)
elif N%2 == 1:
    print(N//2)

Solution (Python):
n=int(input())
n=n-1
print (n//2)

Solution (Python):
n = int(input())

print(n//2-1 + n % 2)

Solution (Python):
n= int(input())
if n%2== 0:
    print(n//2-1)
else:
    print(n//2)

Solution (Python):
N = int(input())
if N % 2 == 0 :
  print(N // 2 - 1 )
else :
  print(N // 2)

Solution (Python):
N=int(input())
a=0
if N%2==0:
  a=N//2-1
else:
  a=N//2
print(a)

Solution (Python):
import math

N = int(input())
print(math.ceil(N/2) -1 )

Solution (Python):
N = int(input())
if N%2==0:
  print(N//2-1)
else:
  print(N//2)

Solution (Python):
n=int(input())
if n%2==0:
  print(n//2-1)
else:
  print(n//2)

Solution (Python):
N = int(input())
print((N-1)//2)

Solution (Python):

N = int(input())

if N % 2 == 1:
    print(int(N / 2))
else:
    print(int(N / 2 - 1))

Solution (Python):
n=int(input())
if n%2==0:
  print(int(n/2)-1)
else:
  print(int((n-1)/2))

Solution (Python):
import math

N = int(input())
if (N%2 == 0):
    print(math.floor(N/2)-1)
else:
    print(math.floor(N/2))

Solution (Python):
n = int(input())

ans = 0
if n % 2 == 0:
	ans = (n - 2)/2
else:
	ans = (n - 1)/2


print(int(ans))

Solution (Python):
N = int(input())

print((N // 2) - 1 if N % 2 == 0 else N // 2)

Solution (Python):
import math
import numpy as np

N = int(input())

N_half = math.floor(N/2)

counts = 0
for i in np.arange(1, N):
    j = N-i
    if(i != j ):
        counts += 1
        
print(int(counts/2))

Solution (Python):
def inpl(): return list(map(int, input().split()))
print((int(input())-1)//2)

Solution (Python):

n = int(input())

if n%2 == 0:
    print(int(n/2-1))
else:
    print(n//2)

Solution (Python):
N = int(input())
ans = 0
for i in range(1, N//2+1):
    if i != N-i:
        ans += 1
print(ans)

Solution (Python):
n = int(input())

if n % 2 == 0:
  ans = n / 2 - 1
else:
  ans = n / 2
  
print(int(ans))

Solution (Python):
N=int(input())
if N % 2 == 0:
    print(int(N/2)-1)
else:
    print(int(N/2))

Solution (Python):
N = int(input())
print((N-1) // 2)

Solution (Python):
N=int(input())
print((N-1)//2)

Solution (Python):
n = int(input())
if n % 2 == 1:
    print(int((n - 1) / 2))
else:
    print(int(n / 2 - 1))

Solution (Python):
n=int(input())
print ((n-1)//2)

Solution (Python):
print(int((int(input())+1)/2-1))

Solution (Python):
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N,num):
    if N<=0:
        return [[]]*num
    elif num==1:
        return [I() for _ in range(N)]
    else:
        read_all = [tuple(II()) for _ in range(N)]
        return map(list, zip(*read_all))



N = I()

ans = 0
for i in range(1,N):
    if i!=N-i and i<=N//2:
        ans += 1
print(ans)

Solution (Python):
N = int(input())
if N%2:
    N += 1
print(N//2-1)

Solution (Python):
import math
a = int(input())
if a%2 == 0:
    print(int((a/2-1)))
else:
    b = int(math.floor(a/2))
    print(b)

Solution (Python):
print((int(input())+1)//2 - 1)

Solution (Python):
n=int(input())

if n%2==0:
    print(int((n/2)-1))
else:
    print(int(n/2))

Solution (Python):
n = int(input())
if n%2 ==0:
    cnt = n/2 - 1
elif n%2 !=0:
    cnt = n//2
print(int(cnt))

Solution (Python):
N = int(input())
if N % 2 == 0:
    print(N // 2 - 1)
else:
    print(N // 2)

Solution (Python):
N = int(input())

if N%2 == 0:
    print(int(N//2-1))
else:
    print(int((N+1)//2-1))

Solution (Python):
n = int(input())
if(n%2==0):
    print(int(n/2-1))
else:
    print(n//2)

Solution (Python):
N = int(input())

ans = 0
if N % 2 == 0:
  ans = N // 2 - 1
else:
  ans = N // 2

print(ans)

Solution (Python):
N=int(input())

if N%2==1:
	print(N//2)
else:
  print(int(N/2-1))

Solution (Python):
N = int(input())
print((N-1)//2)

Solution (Python):
def sum(a):
    c=0
    if a%2==0:
        n=a//2
    else:
        n=a//2+1
    for i in range(1,n):
        if a-i<a and a-i>=1:
            c=c+1
    return c
a=int(input())
print(sum(a))

Solution (Python):
N = int(input())
if N%2 == 0:
  print((N-2)//2)
else:
  print((N-1)//2)

Solution (Python):



def solve(*args: str) -> str:
    n = int(args[0])
    return str(n//2-1 if n % 2 == 0 else n//2)


if __name__ == "__main__":
    print(solve(*(open(0).read().splitlines())))

Solution (Python):
n = int(input())

if n % 2 == 1:
  print(n//2)
else:
  print(n//2 - 1)

Solution (Python):
n=int(input())
ans=(n-1)//2
print(ans)

Solution (Python):
import math
n = int(input())
ans = math.ceil(n/2) - 1
print(ans)

Solution (Python):
n=int(input())

if n==0 or n==1 or n==2:
  print(0)
elif n==3:
  print(1)
elif n%2==1:
  print(int(n/2))
elif n%2!=1:
  print(int(n/2)-1)

Solution (Python):
N = int(input())

count = 0

if N % 2 == 0:
    for i in range(1,int(N/2)):
        if i != N-i:
            count+=1
else:
    for i in range(1,int(N/2)+1):
        if i != N:
            count+=1
print(count)

Solution (Python):
import math
n = int(input())
x = math.sqrt(n)
if n == 1:
    print(0)
elif n % 2 == 1:
    print(math.floor(n/2))
elif n % 2 == 0:
    print(round(n/2)-1)

Solution (Python):
N = int(input())
half = 0
if N % 2 == 0:
  half = N//2-1
else:
  half = N//2
print(half)

Solution (Python):
n = int(input())

count = 0
for i in range(1,n//2+1):
    if not n - i == i:
        count +=1
        
print(count)

Solution (Python):
import math

n = int(input())

print(math.ceil(n/2)-1)

Solution (Python):
n = int(input())

count = 0

if n < 2:
  print(0)
  exit()
  
for i in range(n//2):
  a = i + 1
  b = n - a
  if a != b and a > 0 and b > 0:
    count = count + 1

print(count)

Solution (Python):
n = int(input())
counter = 0

if n%2 == 0:
    half = n//2
else:
    half = (n-1)//2
for i in range(1, half+1):
    if i != n-i:
        counter +=1

print(counter)

Solution (Python):
N = int(input())
ctr = 0
if N <= 2:
	print(0)
else:
	if (N - 2) % 2 == 0:
		print(N // 2 - 1)
	else:
		print((N - 1) // 2)

Solution (Python):
a=int(input())

print(int((a-1)/2))

Solution (Python):
N = int(input())

if (N % 2 == 0):
    print(int(N / 2) - 1)
else:
    print(int(N / 2))

Solution (Python):
n = int(input())

if n % 2 == 0:
  print(n//2 - 1)
else:
  print((n-1)//2)

Solution (Python):
N = int(input())
print(int((N-1) / 2))

Solution (Python):
import math
N = int(input())
count = 0
N = N / 2 - 0.1
print(math.floor(N))

Solution (Python):

N = int(input())


if N%2==0:
    print(int(N/2-1))
else:
    print(int(N/2))

Solution (Python):
print((int(input())-1)//2)

Solution (Python):
N = int(input())
N = N-1
ANS = N//2
print(ANS)

Solution (Python):
n = int(input())

ans = 0
if n % 2 == 0:
  
  ans = (n / 2) - 1
else:
  ans = n // 2

print(int(ans))

Solution (Python):
n = int(input());

ans = 0
if n % 2 == 0:
    ans = n // 2 - 1
else:
    ans = n // 2
print(ans)

Solution (Python):
import sys
input = sys.stdin.readline


N = int(input())


if N % 2 == 0:
    print(N//2-1)
else:
    print(N//2)

Solution (Python):
import numpy as np

n = int(input())

ar = np.array(range(1, (n // 2) + 1))


br = n - ar



print(np.count_nonzero(ar != br))

Solution (Python):
N=int(input())
if N%2==0:
  print(N//2-1)
else:
  print(N//2)

Solution (Python):


import math


N = int(input())

if N%2 == 1 :
  print (int(math.floor(N/2)))
else :
  print (int((N/2)-1))

Solution (Python):
N = int(input())

if N%2 == 0:
    print(int(N/2)-1)
else:
    print(int(N//2))

Solution (Python):
n = int(input())
cnt = 0
for i in range(n//2):
	if (i+1)+ (i+1) == n:
		continue
	cnt +=1
print (cnt)

Solution (Python):
n=int(input())
if n%2==0:
  ans=n//2-1
else:
  ans=n//2

print(ans)

Solution (Python):
N = int(input())

print((N - 1)//2)

Solution (Python):
N=int(input())

if N%2 == 0:
    print(N//2 -1)
else:
    print(N//2)

Solution (Python):
n = int(input())
a = 0
if n % 2 == 0:
    a = n / 2 - 1
else:
    a = (n-1)/2

print(int(a))

Solution (Python):
N = int(input())

mycnt = 0


if N%2 ==0:
    mylen = int(N/2)
else:
    mylen = int(N/2)+1
for i in range(mylen):
    if N - i < N:
        mycnt += 1

print(mycnt)

Solution (Python):
N = int(input())
ans = 0
for i in range(1, N+1):
    if N - i > 0 and i != N - i and i < N - i:
        ans += 1
print(ans)

Solution (Python):
N = input()
N = int(N)

out = int((N-1)/2)
print(out)

Solution (Python):
N = int(input())

if N % 2:
    print(N // 2)
else:
    print(N // 2 - 1)

Solution (Python):
num = int(input())
print((num-1)//2)

Solution (Python):
N = int(input())

if N%2 == 0:
    print(int(N/2)-1)
else:
    print(int(N//2))

Solution (Python):
import math
print(math.ceil(int(input())/2) -1)

Solution (Python):
n = int(input())

print((n-1) //2)

Solution (Python):
import math
n = int(input())
print(math.ceil(n/2)-1)

Solution (Python):
N = int(input())
print((N-1)//2)

Solution (Python):
n = int(input())
ans = (n//2)
if n%2==0:
    ans=ans-1
print(ans)

Solution (Python):
print((int(input())-1)//2)

Solution (Python):
N = int(input())
print((N-1)//2)

Solution (Python):
N=int(input())

if N%2==1:
    print(int(N//2))

else:
    print(int(N/2-1))

Solution (Python):



N = int(input())

if N%2 == 0:
    print(int(N/2)-1)
else:
    print(int(N/2))

Solution (Python):
N = int(input())
print((N-1)//2)

Solution (Python):
N=int(input())

print([0 if N<3 else (N-1)//2][0])

Solution (Python):


input=input()

input=input.split(" ")

N=int(input[0])

ans=None

if N%2==0:
    ans=N/2-1
else:
    ans=(N-1)/2

print(int(ans))

Solution (Python):
N = int(input())
ans = 0
if N%2 == 0:
    ans= N//2 -1
else:
    ans = (N-1)//2
print(ans)

Solution (Python):
import math
n = int(input())

if n % 2 == 0:
  ans = math.floor(n/2) -1
  
else:
  ans = math.floor(n/2)

print(ans)

Solution (Python):
import math
n=int(input())
print(math.ceil(n/2)-1)

Solution (Python):
N = int(input())
a = N//2-1 if N%2==0 else N//2
print(a)

Solution (Python):
N = int(input())

if N%2 == 0:
    print(N//2 -1)
else:
    print(N//2)

Solution (Python):
n = int(input())


if n%2 == 0:
  print(int(n/2-1))
else:
  print(int(n/2))

Solution (Python):
N = int(input())

if N % 2 == 0:
    print(N//2 - 1)
else:
    print(N//2)

Solution (Python):
n = int(input())

if n % 2 == 1:
    print(n // 2)
else:
    print((n // 2) - 1)

Solution (Python):
import numpy as np

n=int(input())
print(int(np.ceil(n/2)-1))

Solution (Python):
a=int(input())

if(a==0 or a==1):
    print("0")
else:
    if(a%2==0):
        print(int(a/2-1))
    else:
        print(int(a/2))

Solution (Python):
N = int(input())

if N % 2 == 0:
    print(N//2-1)
else:
    print(N//2)

Solution (Python):
n = int(input())
if n % 2 == 0:
    print(int(n/2-1))
else:
    print(int(n//2))

Solution (Python):
n=int(input())
print((n-1)//2)

Solution (Python):
N = int(input())

if not N % 2: print(N//2-1)
else: print((N-1)//2)

Solution (Python):
n=int(input())
print((n-1)//2)

Solution (Python):
N = int(input())
print((N-1)//2)

Solution (Python):

n = int(input())
ans = 0
for i in range(1,n//2+1):
    if(n-i != i):
        ans += 1
print(ans)

Solution (Python):



import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(1000000)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
if n % 2 == 0:
    print(n//2 - 1)
else:
    print(n//2)

Solution (Python):
n=int(input())
ans=0
m=int(n/2) if n%2==0 else int(n/2+1)
for i in range(1,m):
    if(n-i>0):
        ans+=1;
print(ans)

Solution (Python):
n=int(input())
if n==1 or n==2:
  print(0)
elif n%2==0:
  print(int((n/2)-1))
else:
  print(int(n//2))

Solution (Python):
n = int(input())
print((n - 1)// 2)

Solution (Python):
input_n = int(input())

if input_n % 2 == 0:
    res = input_n / 2 - 1
else:
    res = (input_n - 1) / 2

print(int(res))

Solution (Python):
n=int(input())
if n%2==0:
    print(int((n/2)-1))
else:
    print(int(n/2))

Solution (Python):
def main():
    N = int(input())
    num_list = set()
    for i in range(1,N+1):
        tmp = N - i
        if i == tmp or tmp == 0:
            continue
        else:
            num_list.add((i,tmp))

    if len(num_list) % 2 == 0:
        print(len(num_list) // 2)
    else:
        print(len(num_list) // 2 + 1)



if __name__ == "__main__":
    main()

Solution (Python):

import sys
sys.setrecursionlimit(200000)
input = sys.stdin.readline
def ii(): return int(input())
def mi(): return map(int, input().rstrip().split())
def lmi(): return list(map(int, input().rstrip().split()))
def fi(): return float(input())
def mfi(): return map(float, input().rstrip().split())
def lmfi(): return list(map(float, input().rstrip().split()))
def li(): return list(input().rstrip())
def debug(*args, sep=" ", end="\n"): print("debug:", *args, file=sys.stderr, sep=sep, end=end) if not __debug__ else None
def exit(*arg): print(*arg); sys.exit()



def main():
    n = ii()
    if n % 2 == 0:
        print(n // 2 - 1)
    else:
        print((n - 1) // 2)
    return


if __name__ == '__main__':
    main()

Solution (Python):
N =int(input())
if N%2==1:
  print(int((N-1)/2))
else:
  print(int((N/2)-1))

Solution (Python):
n = int(input())

ans = (n-1)//2

print(ans)

Solution (Python):
N = int(input())
count = 0
for i in range(N):
  if N - (i+1) != (i+1):
    count += 1
print(int(count/2))

Solution (Python):
N = int(input())

print((N - 1) // 2)

Solution (Python):
print((int(input())-1)//2)

Solution (Python):
a=int(input())
if a%2==1:
  print(a//2)
else:
  print(a//2-1)

Solution (Python):
a = int(input())
if(a%2==0):
  print(a//2-1)
if(a%2==1):
  print(a//2)

Solution (Python):
import numpy as np

input = list(map(int,input().split()))

N = input[0]

if N%2==0:
  ans = int(N/2-1)
else:
  ans = int((N-1)/2)

print(ans)

Solution (Python):
a = int(input())

if a < 4:
  print(0)
else:
  a -= 1
  print(a//2)

Solution (Python):
def main():
    n = int(input())
    temp = n - 1
    ans = temp // 2
    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
def read():
    N = int(input().strip())
    return N, 

def solve(N):
    x = 1
    y = N - x
    count = 0
    while x < N - x:
        x += 1
    return x - 1

if __name__ == '__main__':
    inputs = read()
    print("%d" % solve(*inputs))

Solution (Python):
n = int(input())
c=0
done = set()
for i in range (1,n):
    need = n-i
    if need != i and i not in done and need not in done:
        done.add(i);done.add(need)
        c+=1
print(c)

Solution (Python):
import math
print(math.floor((int(input())-1)/2))

Solution (Python):
N=int(input())
print((N-1)//2)

Solution (Python):
N = int(input())

if N % 2 == 1:
  print(int((N-1)/2))
else:
  print(int(N/2-1))

Solution (Python):
N = int(input())

print((N-1)//2)

Solution (Python):
N=int(input())
ans=0
for i in range(1,N//2+1):
    if N-i>0 and N!=2*i:
        ans+=1
print(ans)

Solution (Python):
n=int(input())
count = 0

for i in range(1, int(n/2)+1):
    if i != n - i:
        count += 1

print(count)

Solution (Python):
n=int(input())
if n%2 == 0:
    print((n>>1)-1)
else:
    print(n>>1)

Solution (Python):
n = int(input())
print(n // 2) if n % 2 == 1 else print(n // 2 -1)

Solution (Python):
a=int(input())
if a%2==0:
    print((a//2)-1)
else:
    print(a//2)

Solution (Python):
N = int(input())
if N % 2 == 0:
  print(N//2-1)
else:
  print(N//2)

Solution (Python):
N=int(input())
if N%2==0:
  print(N//2 - 1)
else:
  print(N//2)

Solution (Python):
from sys import stdin
import fractions

n = int(stdin.readline().rstrip())

if n %2 == 1:
    print(n//2)
else:
    print(n//2-1)

Solution (Python):
N = int(input())
if N%2 == 0:
  print((N-2)//2)
else:
  print((N-1)//2)

Solution (Python):
import math

N=int(input())
print(max(math.floor(N/2-0.5),0))

Solution (Python):
def q1(n):
    return (n - 1) // 2


if __name__ == '__main__':
    n = int(input())
    print(q1(n))

Solution (Python):
import sys
input = sys.stdin.readline
def print_ans(N):
    """Test Case
    >>> print_ans(4)
    1
    >>> print_ans(999999)
    499999
    """
    q, mod = divmod(N,2)
    if(mod == 0):
        print(q - 1)
    else:
        print(q)


if __name__ == '__main__':
    N = int(input().rstrip())
    print_ans(N)

Solution (Python):

n = int(input())
counter = 0
for a in range(1,n):
    b = n-a
    if b != a:
        
        counter += 1
print(counter//2)

Solution (Python):
n=int(input()) 
if n%2 == 0:
  print(int(n/2-1))
else:
  print(int((n-1)/2))

Solution (Python):
n = int(input())
print((n - 1) // 2)

Solution (Python):
import math
n = int(input())

print(math.ceil(n/2) -1)

Solution (Python):
n = int(input())
if n % 2 == 0:
	print(n // 2 - 1)
else:
	print(n // 2)

Solution (Python):
print((int(input()) - 1) // 2)

Solution (Python):
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    count = 0
    for i in range(1, N):
        if i != N - i or 0 != N - 1:
            count += 1

    print(count // 2)


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
a = n // 2
if n%2==0:
    print(a-1)
else:
    print(a)

Solution (Python):
N = int(input())
cnt = 0
for i in range(1, N + 1):
  a = i
  b = N - i
  if a != b:
    cnt += 1
print(cnt // 2)

Solution (Python):
import sys; readline = sys.stdin.readline
from collections import deque

N = int(readline())
print((N - 1)//2)

Solution (Python):
n = int(input())
answer = (n - 1) // 2
print(answer)

Solution (Python):
import math

x = int(input())

print(math.ceil(x/2-1))

Solution (Python):
n = int(input())
count = 0
for i in range(1,n):
    count += 1
m = n // 2

print(count - m)

Solution (Python):
N = int(input().strip())

if N % 2 == 0:
    print((N-1)//2)
else:
    print(N//2)

Solution (Python):
import sys
from collections import defaultdict, Counter, deque
from itertools import accumulate, permutations, combinations
from operator import itemgetter
from bisect import bisect_left, bisect_right, bisect
from heapq import heappop, heappush
from fractions import gcd
from math import ceil, floor, sqrt, cos, sin, pi
from copy import deepcopy




def main():
    N = int(input())
    if N%2==0:
        print(N//2-1)
    else:
        print(N//2)
        

if __name__ == '__main__':
    main()

Solution (Python):
import sys


def answer():
    input = sys.stdin.readline
    N = int(input())

    print((N-1) // 2)


if __name__ == '__main__':
    answer()

Solution (Python):
print((int(input())-1)//2)

Solution (Python):
n = int(input())
print(n//2-1+n%2)

Solution (Python):
N = int(input())

if N%2 == 0 :
  print(int((N/2)-1))
else :
  print(int(N/2))

Solution (Python):
n = int(input())
print((n-1) // 2)

Solution (Python):
print((int(input())-1) // 2)

Solution (Python):
n = int(input())
if n%2==0:
    print(n//2-1)
else:
    print(n//2)

Solution (Python):
N=int(input())

if N/2==0:
    print(N//2)
else:
    print((N-1)//2)

Solution (Python):
n = int(input())

if n % 2 == 1:
    ans = n//2
else:
    ans = n/2-1

print(int(ans))

Solution (Python):
a = int(input())
print (int((a-1)/2))

Solution (Python):

n = int(input())
if n % 2 != 0:
    n += 1
print(n // 2 - 1)

Solution (Python):
t = int(input())
if t % 2 == 0:
    print(t//2 - 1)
else:
    print((t-1)//2)

Solution (Python):
n = int(input())
if n%2 == 0:
    print(int((n-2)/2))
else:
    print(int((n-1)/2))

Solution (Python):
n = int(input())

if n%2 == 0:
    print(int(n/2)-1)
else:
    print(int(n/2))

Solution (Python):

def solve(n):
    used = set()
    for a in range(1, n + 1):
        b = n - a
        if a < b:
            used.add((a, b))
    return len(used)
def main():
    n = int(input())
    print(solve(n))
if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())

if n%2==0:
    print(n//2-1)
else:
    print((n-1)//2)

Solution (Python):
N=input()
S=set()
for a in range(1,10**6+1):
    b=N-a
    if b>0:
        if a>b: a,b=b,a
        if a!=b:
            S.add((a,b))
    
print len(S)

Solution (Python):
N = int(input())
if N%2 == 0:
    print(N//2 - 1)
else:
    print(N//2)

Solution (Python):
n = int(input())
count = 0

for i in range(1, int(n/2)+1):
    x = n - i  
    if x != i:
        count+=1
print(count)

Solution (Python):
import sys

n = int(input())

if n <= 3:
    print(0)
    sys.exit()

if n%2==0:
    print(n//2-1)
else:
    print(n//2)

Solution (Python):
N = int(input())

res = 0

for i in range(1,N//2+1):
    temp = N - i
    if i != temp:
        res += 1

print(res)

Solution (Python):
N = int(input())
ans = int(N / 2)
if N % 2 == 0:
    ans -= 1
print(ans)

Solution (Python):
N = int(input())

counter = 0
for x in range(1, N//2 + 1):
    y = N - x
    if 0 < y and y != x:
        counter += 1

print(counter)

Solution (Python):
print((int(input())-1)//2)

Solution (Python):
n=int(input())

print((n-1)//2)

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    if n % 2 == 0:
        print(n // 2 - 1)
    else:
        print(n // 2)


if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
print(n//2-(not n&1))

Solution (Python):
a = int(input())
if a % 2 == 0:
    print(int(int(a/2) - 1))
else:
    print(int(a/2))