import core.bitop, std.algorithm, std.ascii, std.bigint, std.conv, std.math,
    std.functional, std.numeric, std.range, std.stdio, std.string, std.random,
    std.typecons, std.container, std.format;

// dfmt off
T lread(T = long)(){return readln.chomp.to!T();}
T[] aryread(T = long)(){return readln.split.to!(T[])();}
void scan(TList...)(ref TList Args){auto line = readln.split();
foreach (i, T; TList){T val = line[i].to!(T);Args[i] = val;}}
alias sread = () => readln.chomp();enum MOD = 10 ^^ 9 + 7;
alias PQueue = BinaryHeap!(Array!long, "a<b");
// dfmt on

/// Number of k-combinations
T combination(T = long)(T n, T k)
{
    assert(0 <= k);
    assert(0 <= n);
    if (n < k)
        return 0;
    k = min(n - k, k);
    if (k == 0)
        return 1;
    if (k == 1)
        return n;
    return memoize!combination(n - 1, k - 1) + memoize!combination(n - 1, k);
}

void main()
{
    long N = lread();
    if (N == 1)
    {
        writeln(0);
        return;
    }

    long ans;
    if (N % 2 == 0)
    {
        foreach (i; 0 .. N - 1)
        {
            ans += (i + 1) % (i + 2);
        }
        ans += N % 1;
    }
    else
    {
        ans += 1 % 1;
        foreach (i; 1 .. N - 1)
        {
            ans += (i + 1) % (i + 2);
        }
        ans += N % 2;
    }
    writeln(ans);

    // {
    //     auto P = iota(N).map!"a+1"().array;
    //     long ans;
    //     long[] ansa;

    //     do
    //     {
    //         long sum;
    //         foreach (i; 0 .. N)
    //             sum += (i + 1) % P[i];
    //         if (ans < sum)
    //         {
    //             ans = sum;
    //             ansa = P.dup;
    //         }
    //     }
    //     while (nextPermutation(P));
    //     writeln(ans, ansa);
    // }
}
