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



Sample input:
4


Sample output:
1

Submission status: Accepted

Solution code:
from collections import defaultdict, deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys
import random
import itertools
import 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)]


def gcd(x, y):
    if y == 0:
        return x
    return gcd(y, x % y)


def my_index_multi(l, x):
    return [i for i, _x in enumerate(l) if _x == x]


def sosu(x):
    for i in range(2, int(sqrt(x)+1)):
        if x % i == 0:
            return False
    return True


mod = 1000000007
inf = float('INF')


def A():
    N = II()

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

# B


def B():
    N = II()
    if N <= 81 and N > 9:
        for i in range(2, 10):
            if N % i == 0 and N/i <= 9:
                print('Yes')
                return

    elif N > 81:
        print('No')
        return
    else:
        print('Yes')
        return
    print('No')

    return

# C


def C():
    N = II()

    L = []
    count = 0
    for i in range(2, int(sqrt(N)+2)):
        if N % i == 0:
            L.append(N/i)
            count = 1
    if count == 0:
        print(N-1)
    else:
        print(int(L[-1]-2+(N/L[-1])))

    return

# D


def D():

    a, b, x = LI()
    BIG = a*a*b/2
    if x > BIG:
        y = 2*b-(2*x/a/a)
        print(math.degrees(math.atan(y/a)))
    else:
        y = 2*x/a/b
        print(math.degrees(math.atan(b/y)))
    return

# E


def E():
    N, K = LI()
    A = LI()
    F = LI()
    A.sort(reverse=True)
    F.sort()
    cost = []
    for i in range(len(N)):
        cost.append(A[i]*F[i])

    a = F[cost.index(max(cost))]

    return

# F


def F():
    N, M = LI()

    value = [0] * M
    power = [0] * M
    for i in range(M):
        a, b = LI()
        value[i] = a
        c = LI()
        L = ['0'] * N
        for k in c:
            L[k - 1] = '1'
        bint = ''.join(L)
        power[i] = int(bint, 2)
    bint = ''.join(list(['1'] * N))
    dp = [inf] * (int(bint, 2)+1)
    t = 0
    cost = 0

    dp[0] = 0
    for s in range(int(bint, 2) + 1):
        for i in range(M):
            t = s | power[i]
            cost = dp[s] + value[i]
            dp[t] = min(dp[t], cost)
    print(-1) if(dp[-1] == inf) else print(dp[-1])

    return

    # you can write to stdout for debugging purposes, e.g.
# print("this is a debug message")


def solution(S):
    # write your code in Python 3.6
    N = len(S)

    pass


# Solve
if __name__ == '__main__':
    A()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from math import ceil
print(ceil(int(input()) / 2 - 1))

Submission status: Accepted

Solution code:
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import bisect
import copy
import math


N = int(stdin.readline().rstrip())
N = int((N-1) / 2)
print(N)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

def readInts():
  return [int(s) for s in input().split(" ")]

def main():
  N = readInts()[0]

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

if __name__ == "__main__":
  main()

Submission status: Accepted

Solution code:
if __name__ == "__main__":
    n = int(input())
    print(str(n % 2 + n//2 - 1))

Submission status: Accepted

Solution code:
n = int(input())


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

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
n = int(input())
if n % 2 == 0:
    print(n // 2 - 1)
else:
    print(n // 2)

Submission status: Accepted

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

print(Ans)

Submission status: Accepted

Solution code:
import sys
import math
MAX_INT = int(10e12)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline 

n = int(input())
#a = [int(i) for i in readline().split()]
#b = [int(i) for i in readline().split()]

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

Submission status: Accepted

Solution code:
N=int(input())
cnt=0
X=N/2
while X>1:
  X=X-1
  cnt=cnt+1
print(cnt)

Submission status: Accepted

Solution code:
def solve():
    i = int(input())
    print(i // 2 -1 if i % 2 == 0 else i // 2)


if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
for a in range(1, n):
    b = n - a
    if b < a:
        break
    if b != a and b > 0:
        ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

ns = lambda : stdin.readline().rstrip()
ni = lambda : int(ns())
na = lambda : list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10 ** 7)

def main():
  n = ni()
  res = set()
  for i in range(1, n // 2 + 1):
    a, b = n - i, i
    if a == b:
        continue
    if (a, b) not in res and (b, a) not in res:
      res.add((a, b))
  print(len(res))
  
if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

#lines = stdin.readlines()
def rint():
    return map(int, sys.stdin.readline().split())

def input():
    return sys.stdin.readline().rstrip('\n')

def oint():
    return int(input())

N = oint()

ans = N//2

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

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

if N == 1:
    print(0)
    exit()

cnt = 0 if N % 2 == 0 else 1
for i in range(1, N // 2):
    cnt += 1

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
import sys

N = int(sys.stdin.readline())


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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- Coding: utf-8 -*-

import sys


input = sys.stdin.readline


def main():
    N = int(input())

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import bisect

mod = 1000000007

def main():
    n = int(input())
    print((n-1)//2)
    return


if __name__=='__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())


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

Submission status: Accepted

Solution code:
#coding:utf-8
import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = True
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]

    n = II()

    print((n-1)//2)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
if n < 3:
    print(0)
else:
    print((n+1)//2-1)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())
print(N // 2 - int(N // 2 * 2 == N))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    N = int(input())

    ans = (N + 1) // 2 - 1
    print(ans)


main()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
def solve():
    N = int(input())
    return N//2 - (1-N%2)
    
if __name__ == '__main__':
    print(solve())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


class AtCoder:
    def main(self):
        N = int(input())

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


# Run main
if __name__ == '__main__':
    AtCoder().main()

Submission status: Accepted

Solution code:
from sys import stdout
printn = lambda x: stdout.write(x)
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
DBG = True # and False
BIG = 999999999
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

n = inn()
print((n-1)//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
from operator import itemgetter
sys.setrecursionlimit(10000000)

def main():
    n = int(input().strip())
    ans = 0
    for i in range(1, n):
        j = n - i
        if i == j:
            continue
        ans += 1
    print(ans // 2)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

if n%2 == 0:
    n -= 1
    
s = n//2

print(s)

Submission status: Accepted

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())
if N % 2 == 0:
    print(N//2-1)
else:
    print(N//2)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
from math import ceil
print(ceil(int(input())/2)-1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

if n % 2 == 1 :
    n += 1

print(n // 2 - 1)

Submission status: Accepted

Solution code:
N = int(input())
def integer(N):
    if N % 2 == 0:
        return N // 2 - 1
    else:
        return (N - 1) // 2
print(integer(N))

Submission status: Accepted

Solution code:
import sys
import math
import bisect
from collections import defaultdict, deque
from heapq import heappush, heappop


def LI(): return [int(x) for x in sys.stdin.readline().split()]


def I(): return int(sys.stdin.readline())


def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res


def IR(n):
    return [I() for i in range(n)]


# A
def A():
    n = I()
    print(n // 2 - 1 if n % 2 == 0 else n // 2)
    return


# B
def B():
    return


# C
def C():
    return


# D
def D():
    return


# E
def E():
    return


# F
def F():
    return


# Unittest
def resolve():
    A()
    return


# Solve
if __name__ == "__main__":
    A()

Submission status: Accepted

Solution code:
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

n = INT()

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():
    input = sys.stdin.readline
    N = int(input())
    ans = N // 2
    if ans * 2 == N:
        ans -= 1

    return ans

if __name__ == '__main__':
    print(main())

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


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


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
import sys
#input = sys.stdin.readline
sys.setrecursionlimit(10**7)
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    n = ri()
    print((n-1)//2)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())


print((n-1)//2)

Submission status: Accepted

Solution code:
n = int(input())
seen = set()
ans = 0
for i in range(1,n):
    if (min(i,n-i),max(i,n-i)) not in seen and min(i,n-i) != max(i,n-i):
        ans += 1
        seen.add((min(i,n-i),max(i,n-i)))
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(ans)

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
N = int(input())

print(math.ceil((N-2)/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


def solve(N: int):
    print((N-1)//2)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
def solve():
    sys.setrecursionlimit(100000)
    input = sys.stdin.readline
    N = int(input())
    if N % 2 == 0:
        print(int(N / 2 - 1))
    else:
        print((N // 2))

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(1000000000)
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
mlmis = lambda: [-int(x) for x in input().split()]
INF = float('inf')
#

def main():
    N = ii()
    print((N-1)//2)


main()

Submission status: Accepted

Solution code:
N = int(input())
count = 0
for i in range(1, N):
    j = N - i
    if(i>=j):
        break
    count+=1
print(count)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
import os

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:


N = int(input())

ans = (N+1)//2-1

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
import sys


def solve():
    input = sys.stdin.readline
    mod = 10 ** 9 + 7
    n = int(input().rstrip('\n'))
    cnt = 0
    for i in range(1, n // 2 + 1):
        if n - i != i:
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 2019/11/9

n=int(input())-1
print(n//2)

Submission status: Accepted

Solution code:
n= int(input())

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:
#  --*-coding:utf-8-*--

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
from functools import reduce
from fractions import gcd
import math
import bisect
import itertools
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline
INF = float("inf")


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())


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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

N = int(input())
ans = 0
for i in range(1, N):
    if i < N - i:
        ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n=int(input())

ans=n//2

if n%2==0:
    ans-=1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
words = lambda t : list(map(t, input().split()))
n = int(input())

print((n-1) // 2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
li = list(map(int,input().split()))
n=li[0]
if(n%2==0):
    print(int(n/2-1))
else:
    print(int((n-1)/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

N = int(input())

print(int((N+1)/2)-1)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!


n = int(input())

ans = 0
for i in range(1,n):
    j = n - i
    if j != i and i < j and j > 0:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
N = int(input())

count = 0
for i in range(1, N//2+1):
    j = N - i
    if i != j:
        count += 1

print(count)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

Solution code:
from math import ceil
n = int(input())

print(ceil(n/2) - 1)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
#NIKEI
import sys
import math
import collections
#sys.setrecursionlimit(100000)


n=int(input())

#tmp = input().split()
#a,b,x = list(map(lambda a: int(a), tmp))


n=(n-1)//2
print(n)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
input = lambda: sys.stdin.buffer.readline()[:-1].decode('utf-8')
sys.setrecursionlimit(10**8)
inf = float('inf')
mod = 10**9+7

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

Submission status: Accepted

Solution code:
n=int(input())

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


print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = 0
for a in range(1, N):
    b = N - a
    if a >= b: break
    else: ans += 1

if N <= 2:
    print(0)
else:
    print(ans)

Submission status: Accepted

Solution code:
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()
a = 1
b = n-1
print((n-1)//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
if n == 1:
    print(0)
    exit(0)
l = 1
r = n-1
ans = 0
while l < r:
    l+=1
    r-=1
    ans += 1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import collections
import sys

def read_a_integer():
    return int(sys.stdin.readline())

def read_a_list(dtype):
    return list(map(dtype, sys.stdin.readline().split()))

def main():
    N = read_a_integer()
    print((N - 1) // 2)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

N = int(input())
vis = set()
for i in range(1, N):
  if i in vis: continue
  if i == N - i: continue
  vis.add(i)
  vis.add(N - i)
print(len(vis) // 2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def two_int():
    N, K = map(int, input().split())
    return N,K

def one_int():
    return int(input())

def one_str():
    return input()

def many_int():
    return list(map(int, input().split()))

N=one_int()

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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