#include <stdio.h>

int k,j;

int main() {
    scanf("%d", &k); //k dividendo
    if(k==0) {
        printf("0");
    }
    while(k>0) {
        j=0;
        while(k>=2) {
            k=k-2;
            j=j+1;
        }
        printf("%d", k);
        k=j;
    }
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: