# coding=utf-8: n = int(input()) v = [i for i in range(n)] print(len(v) - 1)