import java.util.Scanner; class Main{ public static void main(String[] args) { Scanner stdIn=new Scanner(System.in); long n=stdIn.nextLong(),c,d,s=0,i; for(i=0;i