package me.yukicoder.lv1; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class No0299 { public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in));) { long N = Long.parseLong(br.readLine()); System.out.println(316 + 52 * (N - 1)); } catch (IOException e) { e.printStackTrace(); } } }