import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		short size, sum;
		while (true) {
			short ze = 0, on = 0, tw = 0, th = 0, fo = 0, fi = 0, si = 0, se = 0, ei = 0, ni = 0;
			sum = 0;
			String input = in.readLine();
			if (input.equals("0")) {
				break;
			}
			size = (short) input.length();
			for (int i = 0; i < size; i += 1) {
				if (Character.toString(input.charAt(i)).equals("0")) {
					ze++;
				} else if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				}
				sum = (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni);
			}
			System.out.println(sum);
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		short size, sum;
		while (true) {
			short ze = 0, on = 0, tw = 0, th = 0, fo = 0, fi = 0, si = 0, se = 0, ei = 0, ni = 0;
			sum = 0;
			String input = in.readLine();
			if (input.equals("0")) {
				break;
			}
			size = (short) input.length();
			for (int i = 0; i < size; i += 1) {
				if (Character.toString(input.charAt(i)).equals("0")) {
					ze++;
				} else if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				}
				sum = (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni);
			}
			System.out.println(sum);
		}
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		short size, sum;
		while (true) {
			short ze = 0, on = 0, tw = 0, th = 0, fo = 0, fi = 0, si = 0, se = 0, ei = 0, ni = 0;
			sum = 0;
			String input = in.readLine();
			if (input.equals("0")) {
				break;
			}
			size = (short) input.length();
			for (int i = 0; i < size; i += 1) {
				if (Character.toString(input.charAt(i)).equals("0")) {
					ze++;
				} else if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				}
				sum = (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni);
			}
			System.out.println(sum);
		}
	} main {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		short size, sum;
		while (true) {
			short ze = 0, on = 0, tw = 0, th = 0, fo = 0, fi = 0, si = 0, se = 0, ei = 0, ni = 0;
			sum = 0;
			String input = in.readLine();
			if (input.equals("0")) {
				break;
			}
			size = (short) input.length();
			for (int i = 0; i < size; i += 1) {
				if (Character.toString(input.charAt(i)).equals("0")) {
					ze++;
				} else if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				}
				sum = (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni);
			}
			System.out.println(sum);
		}
	} BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) short size size sum; sum while (true) {
			short ze = 0, on = 0, tw = 0, th = 0, fo = 0, fi = 0, si = 0, se = 0, ei = 0, ni = 0;
			sum = 0;
			String input = in.readLine();
			if (input.equals("0")) {
				break;
			}
			size = (short) input.length();
			for (int i = 0; i < size; i += 1) {
				if (Character.toString(input.charAt(i)).equals("0")) {
					ze++;
				} else if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				}
				sum = (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni);
			}
			System.out.println(sum);
		} true {
			short ze = 0, on = 0, tw = 0, th = 0, fo = 0, fi = 0, si = 0, se = 0, ei = 0, ni = 0;
			sum = 0;
			String input = in.readLine();
			if (input.equals("0")) {
				break;
			}
			size = (short) input.length();
			for (int i = 0; i < size; i += 1) {
				if (Character.toString(input.charAt(i)).equals("0")) {
					ze++;
				} else if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				}
				sum = (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni);
			}
			System.out.println(sum);
		} short ze = 0 ze 0 on = 0 on 0 tw = 0 tw 0 th = 0 th 0 fo = 0 fo 0 fi = 0 fi 0 si = 0 si 0 se = 0 se 0 ei = 0 ei 0 ni = 0; ni 0 sum = 0 sum 0 String input = in.readLine(); input in.readLine() in.readLine in if (input.equals("0")) {
				break;
			} input.equals("0") input.equals input "0" {
				break;
			} break; size = (short) input.length() size (short) input.length() input.length input for (int i = 0; i < size; i += 1) {
				if (Character.toString(input.charAt(i)).equals("0")) {
					ze++;
				} else if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				}
				sum = (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni);
			} int i = 0; int i = 0; i 0 i < size i size i += 1 i += 1 i 1 {
				if (Character.toString(input.charAt(i)).equals("0")) {
					ze++;
				} else if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				}
				sum = (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni);
			} {
				if (Character.toString(input.charAt(i)).equals("0")) {
					ze++;
				} else if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				}
				sum = (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni);
			} if (Character.toString(input.charAt(i)).equals("0")) {
					ze++;
				} else if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				} Character.toString(input.charAt(i)).equals("0") Character.toString(input.charAt(i)).equals Character.toString(input.charAt(i)) Character.toString Character input.charAt(i) input.charAt input i "0" {
					ze++;
				} ze++ ze if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				} Character.toString(input.charAt(i)).equals("1") Character.toString(input.charAt(i)).equals Character.toString(input.charAt(i)) Character.toString Character input.charAt(i) input.charAt input i "1" {
					on++;
				} on++ on if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				} Character.toString(input.charAt(i)).equals("2") Character.toString(input.charAt(i)).equals Character.toString(input.charAt(i)) Character.toString Character input.charAt(i) input.charAt input i "2" {
					tw++;
				} tw++ tw if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				} Character.toString(input.charAt(i)).equals("3") Character.toString(input.charAt(i)).equals Character.toString(input.charAt(i)) Character.toString Character input.charAt(i) input.charAt input i "3" {
					th++;
				} th++ th if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				} Character.toString(input.charAt(i)).equals("4") Character.toString(input.charAt(i)).equals Character.toString(input.charAt(i)) Character.toString Character input.charAt(i) input.charAt input i "4" {
					fo++;
				} fo++ fo if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				} Character.toString(input.charAt(i)).equals("5") Character.toString(input.charAt(i)).equals Character.toString(input.charAt(i)) Character.toString Character input.charAt(i) input.charAt input i "5" {
					fi++;
				} fi++ fi if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				} Character.toString(input.charAt(i)).equals("6") Character.toString(input.charAt(i)).equals Character.toString(input.charAt(i)) Character.toString Character input.charAt(i) input.charAt input i "6" {
					si++;
				} si++ si if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				} Character.toString(input.charAt(i)).equals("7") Character.toString(input.charAt(i)).equals Character.toString(input.charAt(i)) Character.toString Character input.charAt(i) input.charAt input i "7" {
					se++;
				} se++ se if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				} Character.toString(input.charAt(i)).equals("8") Character.toString(input.charAt(i)).equals Character.toString(input.charAt(i)) Character.toString Character input.charAt(i) input.charAt input i "8" {
					ei++;
				} ei++ ei if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				} Character.toString(input.charAt(i)).equals("9") Character.toString(input.charAt(i)).equals Character.toString(input.charAt(i)) Character.toString Character input.charAt(i) input.charAt input i "9" {
					ni++;
				} ni++ ni sum = (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni) sum (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni) 8 * ei 7 * se 6 * si 5
						* fi 4 * fo 3 * th 2 * tw 0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni 0 * ze 0 ze 1 * on 1 on 2 * tw 2 tw 3 * th 3 th 4 * fo 4 fo 5
						* fi 5 fi 6 * si 6 si 7 * se 7 se 8 * ei 8 ei 9 * ni 9 ni System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		short size, sum;
		while (true) {
			short ze = 0, on = 0, tw = 0, th = 0, fo = 0, fi = 0, si = 0, se = 0, ei = 0, ni = 0;
			sum = 0;
			String input = in.readLine();
			if (input.equals("0")) {
				break;
			}
			size = (short) input.length();
			for (int i = 0; i < size; i += 1) {
				if (Character.toString(input.charAt(i)).equals("0")) {
					ze++;
				} else if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				}
				sum = (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni);
			}
			System.out.println(sum);
		}
	}
} public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		short size, sum;
		while (true) {
			short ze = 0, on = 0, tw = 0, th = 0, fo = 0, fi = 0, si = 0, se = 0, ei = 0, ni = 0;
			sum = 0;
			String input = in.readLine();
			if (input.equals("0")) {
				break;
			}
			size = (short) input.length();
			for (int i = 0; i < size; i += 1) {
				if (Character.toString(input.charAt(i)).equals("0")) {
					ze++;
				} else if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				}
				sum = (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni);
			}
			System.out.println(sum);
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main{
	public static void main(String[] args) throws IOException {
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		short size, sum;
		while (true) {
			short ze = 0, on = 0, tw = 0, th = 0, fo = 0, fi = 0, si = 0, se = 0, ei = 0, ni = 0;
			sum = 0;
			String input = in.readLine();
			if (input.equals("0")) {
				break;
			}
			size = (short) input.length();
			for (int i = 0; i < size; i += 1) {
				if (Character.toString(input.charAt(i)).equals("0")) {
					ze++;
				} else if (Character.toString(input.charAt(i)).equals("1")) {
					on++;
				} else if (Character.toString(input.charAt(i)).equals("2")) {
					tw++;
				} else if (Character.toString(input.charAt(i)).equals("3")) {
					th++;
				} else if (Character.toString(input.charAt(i)).equals("4")) {
					fo++;
				} else if (Character.toString(input.charAt(i)).equals("5")) {
					fi++;
				} else if (Character.toString(input.charAt(i)).equals("6")) {
					si++;
				} else if (Character.toString(input.charAt(i)).equals("7")) {
					se++;
				} else if (Character.toString(input.charAt(i)).equals("8")) {
					ei++;
				} else if (Character.toString(input.charAt(i)).equals("9")) {
					ni++;
				}
				sum = (short) (0 * ze + 1 * on + 2 * tw + 3 * th + 4 * fo + 5
						* fi + 6 * si + 7 * se + 8 * ei + 9 * ni);
			}
			System.out.println(sum);
		}
	}
}