import java.io.*;
import java.util.StringTokenizer;

public class number_vd {
	BufferedReader in;
	StringTokenizer str;
	PrintWriter out;
	String SK;

	String next() throws IOException {
		while ((str == null) || (!str.hasMoreTokens())) {
			SK = in.readLine();
			if (SK == null)
				return null;
			str = new StringTokenizer(SK);
		}
		return str.nextToken();
	};

	int nextInt() throws IOException {
		return Integer.parseInt(next());
	};

	double nextDouble() throws IOException {
		return Double.parseDouble(next());
	};

	long nextLong() throws IOException {
		return Long.parseLong(next());
	};

	void solve() throws IOException {
		String S = next();
		if (S.charAt(0) == '0') {
			out.println(0);
			return;
		}
		int n = S.length();
		int res = 0;
		for (int i = 1; i < n; i++) {
			int len1 = i;
			int len2 = n - i;
			if (len1 > len2)
				break;
			if (S.charAt(i) == '0')
				continue;
			if (len1 == len2)
				res = res
						+ ((S.substring(0, i).compareTo(S.substring(i, n)) < 1) ? 1
								: 0);
			else
				res++;
		}
		out.println(res);

	};

	void run() throws IOException {

		in = new BufferedReader(new FileReader("number.in"));
		out = new PrintWriter("number.out");
		solve();
		out.close();
	}

	public static void main(String[] args) throws IOException {
		new number_vd().run();
	}

}
