// url: http://tenka1-2017-beginner.contest.atcoder.jp/tasks/tenka1_2017_a

import std.algorithm, std.conv, std.range, std.stdio, std.string;

void main()
{
  auto s = readln.chomp;
  writeln(s.count('1'));
}
