//프로그래머스 이진 변환 반복하기
#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>
#include<string.h>
#include <stdbool.h>
#include <stdlib.h>
int* solution(const char* s)
{
char s_copy[150005] = { 0 };
strcpy(s_copy, s);
int answer[2] = { 0 };
char s_one[150005] = { 0 };
int s_len = strlen(s_copy);
while (strlen(s_copy) >1)
{
answer[0]++;
int j = 0;
memset(s_one, NULL, sizeof(s_one));
for (int i = 0; i < strlen(s_copy); i++)
{
if (s_copy[i] == '1')
{
s_one[j] = '1';
j++;
}
else
{
answer[1]++;
}
}
int val = strlen(s_one);
int mok, nmg;
int c = 0;
char arr[100005] = { 0 };
do
{
nmg = val % 2;
mok = val / 2;
arr[c++] = (char)nmg + '0';
val = mok;
} while (mok != 0);
memset(s_copy, NULL, sizeof(s_copy));
strcpy(s_copy, arr);
}
return answer;
}
int main()
{
char s[150005] = { 0 };
scanf_s(" %s", s, 15005);
int* result;
result = solution(s);
printf("%d %d", result[0], result[1]);
return 0;
}