#include <iostream>
#include <fstream>
using namespace std;
ifstream f("input.in");
ofstream g("output.out");
int main()
{
    int n;
    f>>n;
    if(n<32)
    g<<n-1;
    return 0;
}