#include <iostream>
#include <string>
#include <stdlib.h>
using namespace std;

int main() {
  string memo;
  int num = 0;

  cin >> memo;

  for(int i = 0; i < memo.size(); i++) {
    if(memo[i] >= 48 && memo[i] <= 57) {
      num += atoi(&memo[i]);
      //cout << num << endl;                                                  
    }
  }
  cout << num << endl;

  return 0;
}

