import java.io.PipedInputStream; import java.util.*; class pair implements Comparable{ int num; double kyori; pair(int num,double kyori){ this.num=num; this.kyori=kyori; } @Override public int compareTo(Object o) { // TODO Auto-generated method stub return (int)(this.kyori-((pair)o).kyori); } } public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); long ans=0; int n = sc.nextInt(); boolean[] used = new boolean[n]; int[] x = new int[n]; int[] y = new int[n]; for(int i=0;i queue = new PriorityQueue<>(); queue.add(new pair(0, 0)); while(true){ pair now = queue.poll(); if(used[now.num]) continue; ans=Math.max(ans,(long)Math.ceil(now.kyori/10)*10); used[now.num]=true; if(now.num==n-1) break; for(int i=0;i