/* -*- coding: utf-8 -*- * * 1748.cc: No.1748 Parking Lot - yukicoder */ #include #include using namespace std; /* constant */ /* typedef */ /* global variables */ /* subroutines */ /* main */ int main() { int n, k; scanf("%d%d", &n, &k); if (n == 1) puts("1"); else printf("%d\n", (k == n - 1) ? n : n - 1); return 0; }