#include #include #include #include #include #include typedef int32_t i32; typedef int64_t i64; #define MAX(a,b) ((a) > (b) ? (a) : (b)) #define MIN(a,b) ((a) < (b) ? (a) : (b)) #define ABS(a) ((a) > (0) ? (a) : -(a)) void run (void) { i32 n, m; scanf ("%" SCNi32 "%" SCNi32, &n, &m); printf ("%" PRIi32 "\n", n % m); } int main (void) { run (); return 0; }