import java.util.Scanner; class no311{ public static void main(String[] args) { Scanner stdIn=new Scanner(System.in); long n=stdIn.nextLong(); System.out.print(2*(n/3+n/5)); } }