In the city of Saint Petersburg, a day lasts for 2^{100} minutes. From the main station of Saint Petersburg, a train departs after 1 minute, 4 minutes, 16 minutes, and so on; in other words, the train departs at time 4^k for each integer k ≥ 0. Team BowWow has arrived at the station at the time s and it is trying to count how many trains have they missed; in other words, the number of trains that have departed strictly before time s. For example if s = 20, then they missed trains which have departed at 1, 4 and 16. As you are the only one who knows the time, help them!

Note that the number s will be given you in a [binary representation](https://en.wikipedia.org/wiki/Binary_number#Representation) without leading zeroes.

Input

The first line contains a single binary number s (0 ≤ s < 2^{100}) without leading zeroes.

Output

Output a single number — the number of trains which have departed strictly before the time s.

Examples

Input


100000000


Output


4


Input


101


Output


2


Input


10100


Output


3

Note

In the first example 100000000_2 = 256_{10}, missed trains have departed at 1, 4, 16 and 64.

In the second example 101_2 = 5_{10}, trains have departed at 1 and 4.

The third example is explained in the statements.
c = [1, 4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1048576, 4194304, 16777216, 67108864, 268435456, 1073741824, 4294967296, 17179869184, 68719476736, 274877906944, 1099511627776, 4398046511104, 17592186044416, 70368744177664, 281474976710656, 1125899906842624, 4503599627370496, 18014398509481984, 72057594037927936, 288230376151711744, 1152921504606846976, 4611686018427387904, 18446744073709551616, 73786976294838206464, 295147905179352825856, 1180591620717411303424, 4722366482869645213696, 18889465931478580854784, 75557863725914323419136, 302231454903657293676544, 1208925819614629174706176, 4835703278458516698824704, 19342813113834066795298816, 77371252455336267181195264, 309485009821345068724781056, 1237940039285380274899124224, 4951760157141521099596496896, 19807040628566084398385987584, 79228162514264337593543950336, 316912650057057350374175801344, 1267650600228229401496703205376, 5070602400912917605986812821504, 20282409603651670423947251286016, 81129638414606681695789005144064, 324518553658426726783156020576256, 1298074214633706907132624082305024, 5192296858534827628530496329220096, 20769187434139310514121985316880384, 83076749736557242056487941267521536, 332306998946228968225951765070086144, 1329227995784915872903807060280344576, 5316911983139663491615228241121378304, 21267647932558653966460912964485513216, 85070591730234615865843651857942052864, 340282366920938463463374607431768211456, 1361129467683753853853498429727072845824, 5444517870735015415413993718908291383296, 21778071482940061661655974875633165533184, 87112285931760246646623899502532662132736, 348449143727040986586495598010130648530944, 1393796574908163946345982392040522594123776, 5575186299632655785383929568162090376495104, 22300745198530623141535718272648361505980416, 89202980794122492566142873090593446023921664, 356811923176489970264571492362373784095686656, 1427247692705959881058285969449495136382746624, 5708990770823839524233143877797980545530986496, 22835963083295358096932575511191922182123945984, 91343852333181432387730302044767688728495783936, 365375409332725729550921208179070754913983135744, 1461501637330902918203684832716283019655932542976, 5846006549323611672814739330865132078623730171904, 23384026197294446691258957323460528314494920687616, 93536104789177786765035829293842113257979682750464, 374144419156711147060143317175368453031918731001856, 1496577676626844588240573268701473812127674924007424, 5986310706507378352962293074805895248510699696029696, 23945242826029513411849172299223580994042798784118784, 95780971304118053647396689196894323976171195136475136, 383123885216472214589586756787577295904684780545900544, 1532495540865888858358347027150309183618739122183602176, 6129982163463555433433388108601236734474956488734408704, 24519928653854221733733552434404946937899825954937634816, 98079714615416886934934209737619787751599303819750539264, 392318858461667547739736838950479151006397215279002157056, 1569275433846670190958947355801916604025588861116008628224, 6277101735386680763835789423207666416102355444464034512896, 25108406941546723055343157692830665664409421777856138051584, 100433627766186892221372630771322662657637687111424552206336, 401734511064747568885490523085290650630550748445698208825344]
n = int(input(),base=2)
for x in range(100):
    if c[x]>=n:
        break
print(x)