# Original solution
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()


# Optimized solution



            #              ..
            #           .gMMN;
            #           .HMMMR                ....-, .gggggggJJ...
            #     .J,.    TMMN;         ..JgNMMMMMMM{dMMMMMMMMMMMMNNgJ..
            #    .MMMNx.   ?MMb      .JNMMMMMMMMMMMMrJMMMMMMMMMMMMMMMMMNmJ.
            #    ?MMMMMNe.  ?MN,  .iMMMMMMMMMMMMMMMMP(MMMMMMMMMMMMMMMMMMMMMb           .`(zvvvvrOO+.         .(wvO-      _(vvvvvrOz+.   _(ro      _(rl
            #       ?THMMNm. -"!.NMMMMMMMMMMMMMMMMMH%.WHHMMMMMMMMMMMMMMMMMM^           ~ zvC~~~?<?Ovo.       !(rrrI     `_(vO!~~?<1Oro. _(vI      _(rI
            #  .....    ~7W$ ...MMMMMMMMMMMMB0C1????> dZZZZZZZZZWHMMMMMMMB!            ~ zv>     _ Orl      -.vvrrv;     _(vI     _(Ov{ _(rI      _(rI
            #  dMMMMMNNNme .jMMNmTMMMMMMMBC?????????> duZuZuZZuZZZZZXHMMY              ~ zv>     _ zvI      ~jvv<?vw.    _(rI      .zr{ _(rI      _(rI
            #  dMMMMBY"=!`.MMMMMMNmTMMM6????????????z_jZuZZuZuZuZuZZZZC`               ~ zv>    ._JvZ!     _-vI` _jv>    _(vI     _(rr! _(rO-....(-JrI
            #            (MMMMMMMMMD ?1??=?=??=???=?=_(ZZZuZZZZZuZuZV!                 ~ zvw&+xzzwOC!     ._zv:  _.ww_   _(vr&J+xzzrC!  _(rrrrrrvrrrrI
            #          .dMMMMMMMMMD_.- ?1?=?????=???=_(ZZuZZuZuZZZX=`                  ~ zvZ7I1vv>        _(vv&..-(rro   _(rvC777<<`    _(vZ!````~_jrI
            #         .dMMMMMMMMM=.....- ?1??=??????=<(SZZuZZuZZZV!                    ~ zv> _.1rO-      ..wrOOOOOOOrw-  _(vZ           _(vI      _(vI
            #         (MMMMMMMM#!........- <?=???=??=:.SZuZZuZZ0>                      ~ zv>   -?ww-     ~jvv      ~(vO  _(rI           _(rI      _(rI
            #        .MMMMMMMM#!......_(J-.-.<?=?????>.ZZZuZZZC`                       ~ zv>    _(Or+   _.rZ`       -zv{ _(rI           _(vI      _(rI
            #        dMMMMMMMMt.......(TMNm,.-.<=??=?> XZZZZV!                         ~ zv>     _(Or+..~zv>        _(vw._(vI           _(rI      _(rI
            #       .MMMMMMMM#_.........?WMNm,.--<=??z_dZZ0=`                          ~ zw:      _.OO>_.rC`         _jr>_(rC           _(rC      _(rC
            #       (MMMMMMMMD.......-gNNMMMM$...--<?v`dZV~...
            #        dX0vrOz<_``.    -7Y=<~_.......     <gMMMMNNmgJJ...                                                <-. (<
            #       jMMMMMMMNZ???>>+++++(((((----...    dMMMMMMMMMMMMMMNNagJ...                                         (<z!
            #       dMMMMMMMMR??>??>?>??>?>??>?????<    ?MMMMMMMMMMMMMMMMMMMMMMNNm,                                    .+>?1.
            #       JMMMMMMMMK>?????>??>??>?>???<<_(+_ (,?HMMMMMMMMMMMMMMMMMMMMMMMMm.                                  `    `
            #       (MMMMMMMMN+?>>?>??>?>????<<_(;::<_Jyyx?rttrZVVHMMMMMMMMMMMMMMMMMb   ...-.......            ....       ..-.......     ....      ...
            #       .MMMMMMMMNy?>?>?>????<<~_(;::;:;!.Xyyy+(rrtrtrttrrZUWMMMMMMMMMMMM;  _.vrOOOOOwvO+.        ~(rrw_      _jrrOOOOrvO-  - jv>     _ wv:
            #        dMMMMMMMMN+??????<<~-(;;::;;:;< jVyyyWo(trtrrtrtttrtrwMMMMMMMMMM]  _.vZ~    ~_zvI.      ..wrrvl      _jv>    ~?Oro -`jr>     ~ Ov:
            #        .MMMMMMMMMR>??<<_-(;;::;;:;:;;!.XyyyyyWo(OrttrtrrtrttrdMMMMMMMMM\  _.vZ_     ~.vv>     .~jvOOvr-     _jv{     ~(vr_-`jv>     ~ Or:
            #         (MMMMMMMMMC!_-(;;::;:;::;:;;< dVyyyyyyy+(OrrtrtrrtrtrdMMMMMMMMM!  _.vZ_     ~.vr:     _.vI`~(vI.    _jv{     ~-vr!-`jv>     _ wr:
            #          ?MMMMM#5uJ+;;;;:;;:;:;:;::;~.XyyyyyyyyV+(OrtrttrtrrdMMMMMMMMM@   _.vw-  ..-(rr>     ._zv:  -zv:    _jvl   ..(zvC -`jvO((((J+Jrv:
            #           ?YY1(gMMMMN+::;:;:;:;;:;;< dyyyyyyyyyyW+.OrtrrtrwdMMMMMMMMMM\   _.vrrrrrrrZ<`      _(vI   ~(rO.   _jrrrrrrvOC!  -`jrOCCCCOCOrr:
            #             dMMMMMMMMNm+;::;:;::;:;`.VyyyyyyyyyyyWo.OrttrQMMMMMMMMMMMF    _.vO><~jrw_       .-wrrOzzzwrvl   _jvZ!!!~`     -`jv>     ~ Ov:                      .  d=7n   v=7h  .d=7h.
            #             ?MMMMMMMMMMMmx+;:;:;:;< dyyyyyyyyyyyyVy{.zrQNMMMMMMMMMMMF     _.vZ_ -.?rw-      _(vZ<<<<<71ww_  _jv{          -`jv>     ~ Or:          (h (3dIJR.W=!   .(=    .(=  ,$  d{
            #              .TMMMMMMMMMMMMNma+<;<`(yyyyyyyyyyyyyyyV{.dMMMMMMMMMMMMD      _.vZ_   _?wr-    _.rZ`      _jvl  _jv{          -`jv>     ~ Or:           (m$ 4,.,.V .,.(R-... .R-. ..W..f`
            #                (TMMMMMMMMMMMMMMMN;.dkkWWWWWWkQQQNNMMMm(MMMMMMMMMM#^       _.vZ_    _(wv+  ._jv>       __Ov- _jr{          -`jv>     ~ Or:                 `
            #                  .TMMMMMMMMMMMMMM<dMMMMMMMMMMMMMMMMMMMN,HMMMMMM#=         _.vZ_     _.Oro._.rZ`        _(rI._jv{          -`jv>     ~ Ov:
            #                     _THMMMMMMMMMF(MMMMMMMMMMMMMMMMMMMMMN,WMMMD!           _.CC`      ~.7C`~?C!          _7C`_?C!           _?7!     _.?C!
            #                         _?TMMMMM1MMMMMMMMMMMMMMMMMMMMMMMF  `
            #                               `  THMMMMMMMMMMMMMMMB9""!`




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()