import java.util.*;
class Main
{
static int M_S(String s, int x)
{
int count = 0;
int n = 0;
int l = s.length();
boolean f = false;
for (int i = 0; i < l; i++) {
n = n * 10 + (s.charAt(i) - '0');
if (n <= x)
f = true;
else
{
if (f)
count += 1;
n = s.charAt(i) - '0';
f = false;
if (n <= x)
f = true;
else
n = 0;
}
}
if (f == true)
count += 1;
return count;
}
public static void main(String args[])
{
String s;
Scanner in=new Scanner(System.in);
s=in.next();
int x = 30;
System.out.println(M_S(s, x));
}
}
Comments
Leave a comment