import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args)throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); int input = Integer.parseInt(br.readLine()); int sum = 0; int res = 0; int count=0; String temp=""; for(int i = 0; i