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

public class number_av {

	void solve() throws Exception {
		String s = nextToken();
		if (s.charAt(0) == '0') {
			out.println(0);
			return;
		}
		int n = s.length();
		int ans = 0;
		if (n % 2 == 0) {
			int m = n / 2;
			String s1 = s.substring(0, m);
			String s2 = s.substring(m, n);
			if (s1.compareTo(s2) <= 0)
				ans ++;
		}
		for (int i = 0; i < (n - 1) / 2; i++)
			if (s.charAt(i + 1) != '0')
				ans++;
		out.println(ans);
	}

	void run() {
		try {
			in = new BufferedReader(new FileReader(filename + ".in"));
			out = new PrintWriter(filename + ".out");
			//			in = new BufferedReader(new InputStreamReader(System.in));
			//			out = new PrintWriter(System.out);

			solve();

			out.close();
		} catch (Exception e) {
			e.printStackTrace();
			System.exit(1);
		}
	}

	BufferedReader in;
	StringTokenizer st;
	PrintWriter out;
	final String filename = new String("Number").toLowerCase();

	String nextToken() throws Exception {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(in.readLine());
		return st.nextToken();
	}

	int nextInt() throws Exception {
		return Integer.parseInt(nextToken());
	}

	long nextLong() throws Exception {
		return Long.parseLong(nextToken());
	}

	double nextDouble() throws Exception {
		return Double.parseDouble(nextToken());
	}

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

}
