#include <stdio.h>

int main(void) {
	// your code goes here
    int a,b,c;
    scanf("%d%d",&a,&b);
    c=a%b;
    printf("个位数=%d\n",c);
	return 0;
}
