import java.util.Scanner; public class No191 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n=sc.nextInt(); int sum=0,count=0; int[] c=new int[n]; for(int i=0;i=c[i])count++; System.out.println(count*30); } }