#include<cstdio>

int main() {
    int a;
    std::scanf("%d", &a);
    --a;
    std::printf("%d\n", a*a);
}