#include <stdio.h>
int main(){
int arr[10];
int i = 0;
while(1){
scanf("%d\n", &arr[i]);
if(arr[i]==0){
break;
}
i++;
}
for(int j = 0;j<i;j++){
if(arr[j]%2 == 1){
printf("%d\n", 30);
}
else if(arr[j] == 2){
printf("%d\n", 28);
}
else{
printf("%d\n", 31);
}
}
printf("%d", i);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: