int a,i; int m; scanf("%d",&a); for (i=1;i<a;i++) { if(a%i==0) m=i; else continue; } printf("%d",m); return 0;