#include <stdio.h> void dight(int x,int i) { int n = 1; while (i) { i--; n = n*10; } printf("%d\n",x%n); } int main() { int x,i; scanf("%d %d",&x,&i); dight(x,i); return 0; }